Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

Alex Vandiver59dde93a4702
diff --git a/scripts/lib/run_hooks.py b/scripts/lib/run_hooks.py
index d858aa9a50d..51980dbac9f 100755
--- a/scripts/lib/run_hooks.py
+++ b/scripts/lib/run_hooks.py
@@ -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):