Track branch state when parsing versions
This commit is contained in:
parent
071fcbb96b
commit
3720ef838d
@ -151,6 +151,8 @@ def get_app_versions(app_path):
|
|||||||
log.info(f"No tags discovered, moving on")
|
log.info(f"No tags discovered, moving on")
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
initial_branch = _run_cmd("git rev-parse --abbrev-ref HEAD")
|
||||||
|
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
_run_cmd(f"git checkout {tag}")
|
_run_cmd(f"git checkout {tag}")
|
||||||
|
|
||||||
@ -186,7 +188,7 @@ def get_app_versions(app_path):
|
|||||||
|
|
||||||
versions[tag] = service_versions
|
versions[tag] = service_versions
|
||||||
|
|
||||||
_run_cmd("git checkout HEAD")
|
_run_cmd(f"git checkout {initial_branch}")
|
||||||
|
|
||||||
return versions
|
return versions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user