From 1276653ec8c5c107c689ca0682a211063aebf62e Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 14 Jun 2023 18:34:35 +0000 Subject: [PATCH] upgrade-zulip: The "git rev-parse" command can parse "git describe" output directly. --- scripts/lib/upgrade-zulip-stage-2 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2 index 88743c95b6..b77c6e940f 100755 --- a/scripts/lib/upgrade-zulip-stage-2 +++ b/scripts/lib/upgrade-zulip-stage-2 @@ -495,12 +495,8 @@ def run_hooks(kind: Literal["pre-deploy", "post-deploy"]) -> None: env["HOME"] = get_zulip_pwent().pw_dir 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( - ["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() if args.from_git: