mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2026-10-25 10:27:53 +01:00
Add version loading
This commit is contained in:
2 files changed
+7
-5
No files matched your search
+3
-1
@@ -36,7 +36,9 @@ def check_config_exists():
|
||||
return os.path.isfile(config_file)
|
||||
|
||||
def load_version(app):
|
||||
if os.path.isfile(".version"):
|
||||
if os.environ.get("SOURCE_VERSION"):
|
||||
app.config['VERSION'] = os.environ.get("SOURCE_VERSION")
|
||||
elif os.path.isfile(".version"):
|
||||
with open('.version', 'r') as file:
|
||||
data = file.read().replace('\n', '')
|
||||
if data:
|
||||
|
||||
Reference in new issue
Block a user