Track branch state when parsing versions

This commit is contained in:
decentral1se 2021-04-03 20:28:31 +02:00
parent 071fcbb96b
commit 3720ef838d
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A
1 changed files with 3 additions and 1 deletions

View File

@ -151,6 +151,8 @@ def get_app_versions(app_path):
log.info(f"No tags discovered, moving on")
return {}
initial_branch = _run_cmd("git rev-parse --abbrev-ref HEAD")
for tag in tags:
_run_cmd(f"git checkout {tag}")
@ -186,7 +188,7 @@ def get_app_versions(app_path):
versions[tag] = service_versions
_run_cmd("git checkout HEAD")
_run_cmd(f"git checkout {initial_branch}")
return versions