upgrade: Log the commit hash and directory when upgrading.

This commit is contained in:
Alex Vandiver 2022-02-16 11:55:29 -08:00 committed by Tim Abbott
parent dcae70c0c0
commit 1d2582c899
1 changed files with 6 additions and 0 deletions

View File

@ -90,6 +90,12 @@ try:
)
# Generate the deployment directory via git worktree from our local repository.
commit_hash = subprocess.check_output(
["git", "rev-parse", refname],
preexec_fn=su_to_zulip,
text=True,
).strip()
logging.info("Upgrading to %s, in %s", commit_hash, deploy_path)
subprocess.check_call(
["git", "worktree", "add", "--detach", deploy_path, refname],
stdout=subprocess.DEVNULL,