mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -55,7 +55,6 @@ get_deployment_lock(error_rerun_script)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
try:
 | 
					try:
 | 
				
			||||||
    deploy_path = make_deploy_path()
 | 
					    deploy_path = make_deploy_path()
 | 
				
			||||||
    deploy_branch = 'deploy-' + os.path.basename(deploy_path)
 | 
					 | 
				
			||||||
    if not os.path.exists(LOCAL_GIT_CACHE_DIR):
 | 
					    if not os.path.exists(LOCAL_GIT_CACHE_DIR):
 | 
				
			||||||
        logging.info("Cloning the repository")
 | 
					        logging.info("Cloning the repository")
 | 
				
			||||||
        subprocess.check_call(["git", "clone", "-q", remote_url, "--mirror", LOCAL_GIT_CACHE_DIR],
 | 
					        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", "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", "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'),
 | 
					                          stdout=open('/dev/null', 'w'),
 | 
				
			||||||
                          preexec_fn=su_to_zulip)
 | 
					                          preexec_fn=su_to_zulip)
 | 
				
			||||||
    os.chdir(deploy_path)
 | 
					    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",
 | 
					    subprocess.check_call(["ln", "-nsf", "/etc/zulip/settings.py",
 | 
				
			||||||
                           os.path.join(deploy_path, "zproject/prod_settings.py")])
 | 
					                           os.path.join(deploy_path, "zproject/prod_settings.py")])
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user