Short commit hash on heroku

This commit is contained in:
Phillip Kühne 2022-07-15 02:59:33 +02:00
parent 8cc9ed3645
commit 3be307c0f9
Signed by: phillip
GPG Key ID: E4C1C4D2F90902AA

View File

@ -37,7 +37,7 @@ def check_config_exists():
def load_version(app):
if os.environ.get("SOURCE_VERSION"):
app.config['VERSION'] = os.environ.get("SOURCE_VERSION")
app.config['VERSION'] = os.environ.get("SOURCE_VERSION")[0:7]
elif os.path.isfile(".version"):
with open('.version', 'r') as file:
data = file.read().replace('\n', '')