mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-05-19 02:51:48 +02:00
Add version loading
This commit is contained in:
parent
108d70253c
commit
8cc9ed3645
8
.vscode/launch.json
vendored
8
.vscode/launch.json
vendored
@ -12,7 +12,7 @@
|
||||
"request": "launch",
|
||||
"module": "flask",
|
||||
"env": {
|
||||
"FLASK_APP": "backend/main.py",
|
||||
"FLASK_APP": "backend/app.py",
|
||||
"FLASK_ENV": "development",
|
||||
"FLASK_DEBUG": "1"
|
||||
},
|
||||
@ -31,7 +31,7 @@
|
||||
"request": "launch",
|
||||
"module": "flask",
|
||||
"env": {
|
||||
"FLASK_APP": "backend/main.py",
|
||||
"FLASK_APP": "backend/app.py",
|
||||
"FLASK_ENV": "development",
|
||||
"FLASK_DEBUG": "1"
|
||||
},
|
||||
@ -49,7 +49,7 @@
|
||||
"request": "launch",
|
||||
"module": "flask",
|
||||
"env": {
|
||||
"FLASK_APP": "backend/main.py",
|
||||
"FLASK_APP": "backend/app.py",
|
||||
"FLASK_ENV": "development",
|
||||
"FLASK_DEBUG": "1"
|
||||
},
|
||||
@ -68,7 +68,7 @@
|
||||
"request": "launch",
|
||||
"module": "flask",
|
||||
"env": {
|
||||
"FLASK_APP": "backend/main.py",
|
||||
"FLASK_APP": "backend/app.py",
|
||||
"FLASK_ENV": "development",
|
||||
"FLASK_DEBUG": "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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user