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: Pass down, and respect, --from-git argument.

Alex Vandiver47e622f5a58d
diff --git a/scripts/lib/run_hooks.py b/scripts/lib/run_hooks.py
index 51980dbac9f..cfa4de681b8 100755
--- a/scripts/lib/run_hooks.py
+++ b/scripts/lib/run_hooks.py
@@ -56,7 +56,7 @@ def resolve_version_string(version: str) -> str:
).strip()
-if NEW_ZULIP_MERGE_BASE:
+if args.from_git:
# If we have a git repo, we also resolve those `git describe`
# values to full commit hashes, as well as provide the
# merge-base of the old/new commits with mainline.
diff --git a/scripts/lib/upgrade-zulip-stage-3 b/scripts/lib/upgrade-zulip-stage-3
index c896138f29e..0906a7a71a0 100755
--- a/scripts/lib/upgrade-zulip-stage-3
+++ b/scripts/lib/upgrade-zulip-stage-3
@@ -389,8 +389,11 @@ else:
# shutting down the server; we should strive to minimize the number of
# steps that happen between here and the "Restarting Zulip" line
# below.
+ hooks_args = []
+ if args.from_git:
+ hooks_args = ["--from-git"]
- subprocess.check_call(["./scripts/lib/run_hooks.py", "pre-deploy"])
+ subprocess.check_call(["./scripts/lib/run_hooks.py", "pre-deploy", *hooks_args])
if rabbitmq_dist_listen:
shutdown_server()
@@ -450,7 +453,7 @@ else:
logging.info("Upgrade complete!")
- subprocess.check_call(["./scripts/lib/run_hooks.py", "post-deploy"])
+ subprocess.check_call(["./scripts/lib/run_hooks.py", "post-deploy", *hooks_args])
if not args.skip_client_reloads and not args.only_django:
subprocess.check_call(["./scripts/reload-clients"], preexec_fn=su_to_zulip)