update set_build script to work on github
This commit is contained in:
parent
c3fb9672c4
commit
988880cf83
1 changed files with 4 additions and 2 deletions
|
@ -30,8 +30,10 @@ def main():
|
||||||
_check_and_set(build_info, "DOCKER_TAG", docker_tag)
|
_check_and_set(build_info, "DOCKER_TAG", docker_tag)
|
||||||
_check_and_set(build_info, "BUILD", "docker")
|
_check_and_set(build_info, "BUILD", "docker")
|
||||||
else:
|
else:
|
||||||
ci_tag = os.getenv('CI_COMMIT_TAG', os.getenv('GITHUB_REF'))
|
if re.match(r'refs/tags/v\d+\.\d+\.\d+$', str(os.getenv('GITHUB_REF'))):
|
||||||
_check_and_set(build_info, "BUILD", "release" if re.match(r'v\d+\.\d+\.\d+$', str(ci_tag)) else "qa")
|
_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()]))
|
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:
|
with open(build_info_mod.__file__, 'w') as f:
|
||||||
|
|
Loading…
Reference in a new issue