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:
Jascha Ezra Urbach 2023-10-19 11:29:59 +02:00 committed by GitHub
parent 2237a7eb9e
commit 1685ac1953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.6.6

View file

@ -4,6 +4,7 @@ from typing import AnyStr
from environs import Env
import requests
from django.utils.translation import gettext_lazy as _
from django.core.exceptions import ImproperlyConfigured
@ -14,7 +15,13 @@ from django.core.exceptions import ImproperlyConfigured
env = Env()
env.read_env()
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",