From b91a68fe2b758fd35764faaabe815887a0d03141 Mon Sep 17 00:00:00 2001 From: chenchen Date: Mon, 11 May 2026 17:25:57 +0800 Subject: [PATCH] ops(deploy): default Azure VM deploy to pull from heicode-win remote MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bin/azure_vm_deploy.sh pulled from `origin` (xiaohei/heicode.git) when GIT_REF was set. Production VM now tracks heicode-win/main and that's where the rebrand + bug fixes ship — pulling from origin would silently revert all of it on the next deploy. New GIT_REMOTE env var (defaults to heicode-win) lets operators override for one-off cherry-pick deploys. Co-Authored-By: Claude Opus 4.7 (1M context) --- heicode/bin/azure_vm_deploy.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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.