Add 'Latest commit' label to /status page
This commit is contained in:
parent
8f6a7ac2f6
commit
b03ee285a2
|
@ -287,7 +287,7 @@ def status_page() -> Response:
|
||||||
status_message = f"Currently running on '{os.environ.get('UNDERCOVER_SERVER_NAME')}' server"
|
status_message = f"Currently running on '{os.environ.get('UNDERCOVER_SERVER_NAME')}' server"
|
||||||
git_commands = 'git log -1 --pretty=%B; git rev-parse --short HEAD'
|
git_commands = 'git log -1 --pretty=%B; git rev-parse --short HEAD'
|
||||||
current_git_hash = subprocess.check_output([git_commands], shell=True, universal_newlines=True)
|
current_git_hash = subprocess.check_output([git_commands], shell=True, universal_newlines=True)
|
||||||
return make_response(render_template('error.jinja2', status=200, error_text=status_message, extra_text=current_git_hash), 200)
|
return make_response(render_template('error.jinja2', status=200, error_text=status_message, extra_text='Latest commit: ' + current_git_hash), 200)
|
||||||
|
|
||||||
|
|
||||||
@writing_blueprint.route('/', methods=['POST'])
|
@writing_blueprint.route('/', methods=['POST'])
|
||||||
|
|
Loading…
Reference in New Issue