diff --git a/heicode/bin/azure_vm_deploy.sh b/heicode/bin/azure_vm_deploy.sh index 73932b3..c876b04 100755 --- a/heicode/bin/azure_vm_deploy.sh +++ b/heicode/bin/azure_vm_deploy.sh @@ -19,6 +19,11 @@ HEALTH_URL="${HEALTH_URL:-http://127.0.0.1:3000/api/status}" COMPOSE_FILES="${COMPOSE_FILES:--f docker-compose.azure-vm.yml -f docker-compose.override.yml}" ENV_FILE="${ENV_FILE:-.env}" SSH_OPTS="${SSH_OPTS:-}" +# Prod VM tracks heicode-win/main (chenchen/heicode-win.git). The legacy +# `origin` remote (xiaohei/heicode.git) does not receive the rebrand + bug +# fixes that ship to production. Override to "origin" only for one-off +# cherry-pick deployments. +GIT_REMOTE="${GIT_REMOTE:-heicode-win}" GIT_REF="${GIT_REF:-}" if [[ -z "${VM_HOST}" ]]; then @@ -47,9 +52,9 @@ ${SSH} "cd '${REMOTE_DIR}' && \ if [[ -n "${GIT_REF}" ]]; then ${SSH} "cd '${REMOTE_DIR}' && \ - git fetch --prune origin && \ + git fetch --prune ${GIT_REMOTE} && \ git checkout '${GIT_REF}' && \ - git pull --ff-only origin '${GIT_REF}'" + git pull --ff-only ${GIT_REMOTE} '${GIT_REF}'" fi # Persist previous image for rollback.