Revert "upgrade-zulip-from-git: Support specifying tag or commit ID for refname."

This reverts commit 5ea7feee7e.

We had to revert this because it didn't work with non-master branch names.
This commit is contained in:
Tim Abbott 2018-11-06 12:40:45 -08:00
parent 996caddb11
commit a4f5d825b7
1 changed files with 1 additions and 3 deletions

View File

@ -55,7 +55,6 @@ get_deployment_lock(error_rerun_script)
try:
deploy_path = make_deploy_path()
deploy_branch = 'deploy-' + os.path.basename(deploy_path)
if not os.path.exists(LOCAL_GIT_CACHE_DIR):
logging.info("Cloning the repository")
subprocess.check_call(["git", "clone", "-q", remote_url, "--mirror", LOCAL_GIT_CACHE_DIR],
@ -67,11 +66,10 @@ try:
subprocess.check_call(["git", "remote", "set-url", "origin", remote_url], preexec_fn=su_to_zulip)
subprocess.check_call(["git", "fetch", "-q"], preexec_fn=su_to_zulip)
subprocess.check_call(["git", "clone", "-q", LOCAL_GIT_CACHE_DIR, deploy_path],
subprocess.check_call(["git", "clone", "-q", "-b", refname, LOCAL_GIT_CACHE_DIR, deploy_path],
stdout=open('/dev/null', 'w'),
preexec_fn=su_to_zulip)
os.chdir(deploy_path)
subprocess.check_call(["git", "checkout", "-b", deploy_branch, refname], preexec_fn=su_to_zulip)
subprocess.check_call(["ln", "-nsf", "/etc/zulip/settings.py",
os.path.join(deploy_path, "zproject/prod_settings.py")])