mirror of https://github.com/zulip/zulip.git
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:
parent
094e50753e
commit
bdb5f43370
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue