From 988880cf83b4c3057a4a29db11b77df518664e9b Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 21 Jul 2021 11:32:37 -0400 Subject: [PATCH] update set_build script to work on github --- docker/set_build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/set_build.py b/docker/set_build.py index 191abedad..59eb51b9e 100644 --- a/docker/set_build.py +++ b/docker/set_build.py @@ -30,8 +30,10 @@ def main(): _check_and_set(build_info, "DOCKER_TAG", docker_tag) _check_and_set(build_info, "BUILD", "docker") else: - ci_tag = os.getenv('CI_COMMIT_TAG', os.getenv('GITHUB_REF')) - _check_and_set(build_info, "BUILD", "release" if re.match(r'v\d+\.\d+\.\d+$', str(ci_tag)) else "qa") + if re.match(r'refs/tags/v\d+\.\d+\.\d+$', str(os.getenv('GITHUB_REF'))): + _check_and_set(build_info, "BUILD", "release") + else: + _check_and_set(build_info, "BUILD", "qa") log.debug("build info: %s", ", ".join([f"{k}={v}" for k, v in build_info.items()])) with open(build_info_mod.__file__, 'w') as f: