From b285081ca8ce6eee220896795ab1de1e98f53c2b Mon Sep 17 00:00:00 2001 From: pluja Date: Wed, 4 Nov 2020 09:27:19 +0100 Subject: [PATCH] Set commit hash as version for automation --- app/routes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 4c7a8dd..5fcc840 100644 --- a/app/routes.py +++ b/app/routes.py @@ -7,6 +7,7 @@ import random import re import time import urllib +import subprocess from multiprocessing import Process from concurrent.futures import as_completed @@ -774,8 +775,9 @@ def status(): filen = url_for('static', filename='img/open.png') caniregister = True + version = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).strip() return render_template('status.html', title='STATUS', count=count, max=config['maxInstanceUsers'], file=filen, - cani=caniregister, version=config['version']) + cani=caniregister, version=str(version)[2:-1]) @app.route('/error/')