From 52d0423591908779d4c35b0d67cc7044c6b6f208 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 10 Jan 2016 11:12:33 -0800 Subject: [PATCH] Document structure of upgrade-zulip-stage-2 more clearly. --- scripts/lib/upgrade-zulip | 4 +++- scripts/lib/upgrade-zulip-stage-2 | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/lib/upgrade-zulip b/scripts/lib/upgrade-zulip index 712d241a5c..6fdd32c5fe 100755 --- a/scripts/lib/upgrade-zulip +++ b/scripts/lib/upgrade-zulip @@ -50,9 +50,11 @@ try: unpack_zulip = os.path.realpath(os.path.join(os.path.dirname(__file__), 'unpack-zulip')) deploy_path = subprocess.check_output([unpack_zulip, tarball_path], preexec_fn=su_to_zulip) + # Chdir to deploy_path and then run upgrade-zulip-stage-2 from the + # new version of Zulip (having the upgrade logic run from the new + # version is much better for fixing bugs in the upgrade process). deploy_path = deploy_path.strip() os.chdir(deploy_path) - subprocess.check_call(["./scripts/lib/upgrade-zulip-stage-2", deploy_path]) logging.info("Deployment complete") diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2 index 12294309cf..dca7edd147 100755 --- a/scripts/lib/upgrade-zulip-stage-2 +++ b/scripts/lib/upgrade-zulip-stage-2 @@ -1,4 +1,9 @@ #!/usr/bin/env python2.7 +# +# This script contains the actual logic for upgrading from an old +# version of Zulip to the new version. upgrade-zulip-stage-2 is +# always run from the new version of Zulip, so any bug fixes take +# effect on the very next upgrade. import subprocess import os import sys