run_hooks: Diff to "last" instead of "current" during post-deploy.

This commit is contained in:
Alex Vandiver
2025-02-03 19:32:58 +00:00
committed by Tim Abbott
parent 4482d0a009
commit 59dde93a47

View File

@@ -27,8 +27,13 @@ from version import ZULIP_MERGE_BASE as NEW_ZULIP_MERGE_BASE
from version import ZULIP_VERSION as NEW_ZULIP_VERSION
deploy_path = get_deploy_root()
old_version = parse_version_from(DEPLOYMENTS_DIR + "/current")
old_merge_base = parse_version_from(DEPLOYMENTS_DIR + "/current", merge_base=True)
if args.kind == "post-deploy":
old_dir_name = "last"
else:
old_dir_name = "current"
old_version = parse_version_from(DEPLOYMENTS_DIR + "/" + old_dir_name)
old_merge_base = parse_version_from(DEPLOYMENTS_DIR + "/" + old_dir_name, merge_base=True)
path = f"/etc/zulip/hooks/{args.kind}.d"
if not os.path.exists(path):