upgrade-zulip-from-git: Support specifying remote on the command line.

Adds an optional argument `--remote-url` to specify the remote URL.
Command line remote URL will be given preference above the one
in /etc/zulip/zulip.conf.

Fixes #6092.
This commit is contained in:
Shubham Padia 2018-10-20 05:18:33 +05:30 committed by Tim Abbott
parent 094e50753e
commit bdb5f43370
1 changed files with 5 additions and 0 deletions

View File

@ -36,9 +36,14 @@ if os.getuid() != 0:
parser = argparse.ArgumentParser()
parser.add_argument("refname", help="Git reference, e.g. a branch, tag, or commit ID.")
parser.add_argument("--remote-url", dest="remote_url", help="Override the Git remote URL configured in /etc/zulip/zulip.conf.")
args = parser.parse_args()
refname = args.refname
# Command line remote URL will be given preference above the one
# in /etc/zulip/zulip.conf.
if args.remote_url:
remote_url = args.remote_url
subprocess.check_call(["mkdir", '-p',
DEPLOYMENTS_DIR,