From 323130673639fcad87607dcce4267dbdba2fab03 Mon Sep 17 00:00:00 2001 From: shubham-padia Date: Sun, 16 Dec 2018 01:54:18 +0530 Subject: [PATCH] upgrade-zulip: Use deploy_options specified in zulip.conf. Fixes #10534. upgrade-zulip can now also accept the same deploy options as upgrade-zulip-from-git and pass it as arguments to upgrade-zulip-stage-2. --- scripts/lib/upgrade-zulip | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/lib/upgrade-zulip b/scripts/lib/upgrade-zulip index b1e92bf10b..92eca7a7d5 100755 --- a/scripts/lib/upgrade-zulip +++ b/scripts/lib/upgrade-zulip @@ -5,13 +5,19 @@ import sys import subprocess import logging import time +import configparser +from typing import List TARBALL_ARCHIVE_PATH = "/home/zulip/archives" os.environ["PYTHONUNBUFFERED"] = "y" sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, \ - su_to_zulip, get_deployment_lock, release_deployment_lock, assert_running_as_root + su_to_zulip, get_deployment_lock, release_deployment_lock, assert_running_as_root, \ + get_config_file, get_deploy_options + +config_file = get_config_file() # type: configparser.RawConfigParser +deploy_options = get_deploy_options(config_file) # type: List[str] assert_running_as_root(strip_lib_from_paths=True) @@ -49,6 +55,7 @@ try: # version is much better for fixing bugs in the upgrade process). deploy_path = deploy_path.strip() os.chdir(deploy_path) - subprocess.check_call([os.path.abspath("./scripts/lib/upgrade-zulip-stage-2"), deploy_path]) + subprocess.check_call([os.path.abspath("./scripts/lib/upgrade-zulip-stage-2"), deploy_path] + + deploy_options) finally: release_deployment_lock()