diff --git a/vasl_templates/utils.py b/vasl_templates/utils.py index 04081ee..14a1c2c 100644 --- a/vasl_templates/utils.py +++ b/vasl_templates/utils.py @@ -6,7 +6,8 @@ import logging import traceback import json -from vasl_templates.webapp.config.constants import BASE_DIR +from vasl_templates.webapp import app +from vasl_templates.webapp.config.constants import BASE_DIR, IS_FROZEN # --------------------------------------------------------------------- @@ -32,6 +33,16 @@ def get_build_info(): return result +def get_build_git_info(): + """Get the git details for the current build.""" + if IS_FROZEN: + build_info = get_build_info() + if build_info: + return build_info[ "git_info" ] + elif app.config.get( "IS_CONTAINER" ): + return os.environ.get( "BUILD_GIT_INFO" ) + return None + # --------------------------------------------------------------------- def catch_exceptions( caption="EXCEPTION", retval=None ): diff --git a/vasl_templates/webapp/data/default-template-pack/scenario.j2 b/vasl_templates/webapp/data/default-template-pack/scenario.j2 index 3b696cf..cb6d809 100644 --- a/vasl_templates/webapp/data/default-template-pack/scenario.j2 +++ b/vasl_templates/webapp/data/default-template-pack/scenario.j2 @@ -1,5 +1,5 @@ -{%if APP_NAME%}