Skip to content
Snippets Groups Projects
Commit 1d59adf6 authored by Andreas Valder's avatar Andreas Valder
Browse files

always show git commit

parent 87eba101
Branches
No related tags found
No related merge requests found
...@@ -54,6 +54,7 @@ if sys.argv[0].endswith('run.py'): ...@@ -54,6 +54,7 @@ if sys.argv[0].endswith('run.py'):
config.from_pyfile('config.py', silent=True) config.from_pyfile('config.py', silent=True)
if config['DEBUG']: if config['DEBUG']:
app.jinja_env.auto_reload = True app.jinja_env.auto_reload = True
# get git commit # get git commit
import subprocess import subprocess
app.jinja_env.globals['gitversion'] = subprocess.check_output(['git', "log", "-g", "-1", "--pretty=%h # %d # %s"]).decode('UTF-8').split('#') app.jinja_env.globals['gitversion'] = subprocess.check_output(['git', "log", "-g", "-1", "--pretty=%h # %d # %s"]).decode('UTF-8').split('#')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment