mirror of https://github.com/zulip/zulip.git
upgrade-zulip: The "git rev-parse" command can parse "git describe" output directly.
This commit is contained in:
parent
a9bc5e94e7
commit
1276653ec8
|
@ -495,12 +495,8 @@ def run_hooks(kind: Literal["pre-deploy", "post-deploy"]) -> None:
|
||||||
env["HOME"] = get_zulip_pwent().pw_dir
|
env["HOME"] = get_zulip_pwent().pw_dir
|
||||||
|
|
||||||
def resolve_version_string(version: str) -> str:
|
def resolve_version_string(version: str) -> str:
|
||||||
matches = re.search(r"-\d+-g([a-f0-9]{7,})$", version)
|
|
||||||
to_parse = version
|
|
||||||
if matches is not None:
|
|
||||||
to_parse = matches.group(1)
|
|
||||||
return subprocess.check_output(
|
return subprocess.check_output(
|
||||||
["git", "rev-parse", to_parse], cwd=deploy_path, preexec_fn=su_to_zulip, text=True
|
["git", "rev-parse", version], cwd=deploy_path, preexec_fn=su_to_zulip, text=True
|
||||||
).strip()
|
).strip()
|
||||||
|
|
||||||
if args.from_git:
|
if args.from_git:
|
||||||
|
|
Loading…
Reference in New Issue