mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-07-04 09:11:42 +02:00
Add version loading
This commit is contained in:
@ -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