diff --git a/scripts/deploy-zulip-from-git b/scripts/deploy-zulip-from-git index 99706049c3..efcb49b92f 100755 --- a/scripts/deploy-zulip-from-git +++ b/scripts/deploy-zulip-from-git @@ -79,7 +79,5 @@ try: subprocess.check_call(["sudo", os.path.join(deploy_path, "scripts", "lib", "upgrade-zulip-stage-2"), deploy_path, "--from-git"] + deploy_options) - - subprocess.check_call(["./scripts/purge-old-deployments"]) finally: release_deployment_lock() diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2 index dd099f4cb6..110f6e8465 100755 --- a/scripts/lib/upgrade-zulip-stage-2 +++ b/scripts/lib/upgrade-zulip-stage-2 @@ -79,3 +79,5 @@ if os.path.exists("/etc/supervisor/conf.d/zulip_db.conf"): subprocess.check_call(["supervisorctl", "start", "process-fts-updates"], preexec_fn=su_to_zulip) logging.info("Upgrade complete!") + +subprocess.check_call(["./scripts/purge-old-deployments"])