From 36294cb0a95d6ad3fb80dcffb5264a1d3691a6b6 Mon Sep 17 00:00:00 2001 From: pluja Date: Thu, 5 Nov 2020 15:08:54 +0100 Subject: [PATCH] Make server version Docker-compatible (#130) --- app/routes.py | 5 ++--- app/templates/status.html | 1 - yotter-config.json | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/routes.py b/app/routes.py index adfa30a..5646f64 100644 --- a/app/routes.py +++ b/app/routes.py @@ -775,10 +775,9 @@ def status(): filen = url_for('static', filename='img/open.png') caniregister = True - version = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).strip() - update = subprocess.check_output(["git", "log", "-1", "--format=%cd"]).strip() + version = config['version'] return render_template('status.html', title='STATUS', count=count, max=config['maxInstanceUsers'], file=filen, - cani=caniregister, version=str(version)[2:-1], update=str(update)[2:-1]) + cani=caniregister, version=config['version']) @app.route('/error/') diff --git a/app/templates/status.html b/app/templates/status.html index acfb89f..cf16510 100644 --- a/app/templates/status.html +++ b/app/templates/status.html @@ -47,7 +47,6 @@

Yotter version: {{version}}

-

Latest update: {{update}}

diff --git a/yotter-config.json b/yotter-config.json index 7ae8e0b..751096f 100644 --- a/yotter-config.json +++ b/yotter-config.json @@ -11,5 +11,6 @@ "admin_message":"Message from the admin text", "admin_user":"admin_username", "max_old_user_days": 60, - "donate_url": "" + "donate_url": "", + "version": "2020.11.05" }