mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 09:31:08 +00:00
Move version out of settings (#3045)
This removes the content of VERSION from settings.py and moves it into a seperate file which makes it easier to update versionnumbers via script in the future.
This commit is contained in:
parent
2237a7eb9e
commit
1685ac1953
2 changed files with 9 additions and 1 deletions
1
VERSION
Normal file
1
VERSION
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0.6.6
|
|
@ -4,6 +4,7 @@ from typing import AnyStr
|
||||||
|
|
||||||
from environs import Env
|
from environs import Env
|
||||||
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
@ -14,7 +15,13 @@ from django.core.exceptions import ImproperlyConfigured
|
||||||
env = Env()
|
env = Env()
|
||||||
env.read_env()
|
env.read_env()
|
||||||
DOMAIN = env("DOMAIN")
|
DOMAIN = env("DOMAIN")
|
||||||
VERSION = "0.6.6"
|
|
||||||
|
with open("VERSION", encoding="utf-8") as f:
|
||||||
|
version = f.read()
|
||||||
|
version = version.replace("\n", "")
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
VERSION = version
|
||||||
|
|
||||||
RELEASE_API = env(
|
RELEASE_API = env(
|
||||||
"RELEASE_API",
|
"RELEASE_API",
|
||||||
|
|
Loading…
Reference in a new issue