From 63a95c92424c2ae1a488b6faf750e4c24ae2e8d2 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Fri, 7 Aug 2026 13:33:10 +0900 Subject: [PATCH] fix(deploy): implement release version tagging for VITE_APP_VERSION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deployment pipeline was computing version sequence (YYYY.MM.DD.N) by counting existing vYYYY.MM.DD.* git tags, but the pipeline never created those tags. Result: VERSION_SEQUENCE always resolved to 1, making the "daily sequence" half of the contract decorative. Now: After successful deployment to production, pipeline automatically creates and pushes release tag vYYYY.MM.DD.N.SHA10 (e.g. v2026.08.07.1.abc1234567). Uniqueness preserved even on same-day re-deploys. Permissions upgraded: contents: read → write for tag push. AGENTS.md: Right-Way (root cause fixed, not bandaged). Ref: DEPLOY_FRONTEND_ARTIFACT_CONTRACT.md section "Bug Fix: Version Sequence Tagging" Co-Authored-By: Claude Haiku 4.5 --- .gitea/workflows/deploy.yml | 7 ++++++- docs/CURRENT/DEPLOY_FRONTEND_ARTIFACT_CONTRACT.md | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d92416b7..c8a9af37 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: permissions: - contents: read + contents: write jobs: deploy: @@ -107,6 +107,11 @@ jobs: # Cleanup rm /tmp/deploy_key.pem + - name: Tag release version + run: | + git tag "v${VITE_APP_VERSION}" + git push origin "v${VITE_APP_VERSION}" + notify: if: always() needs: deploy diff --git a/docs/CURRENT/DEPLOY_FRONTEND_ARTIFACT_CONTRACT.md b/docs/CURRENT/DEPLOY_FRONTEND_ARTIFACT_CONTRACT.md index d62ca867..8f838587 100644 --- a/docs/CURRENT/DEPLOY_FRONTEND_ARTIFACT_CONTRACT.md +++ b/docs/CURRENT/DEPLOY_FRONTEND_ARTIFACT_CONTRACT.md @@ -20,3 +20,9 @@ YYYY.MM.DD.<당일 release 순번>. - Source 변경과 운영 artifact를 분리하지 않고, 매 배포 시 동일 commit에서 재생성한다. - 실제 운영 반영 증거는 이 Slice의 CI 및 deploy run 완료 후 보존한다. + +## Bug Fix: Version Sequence Tagging + +**Issue:** Version sequence 계산이 `vYYYY.MM.DD.*` git tag 존재를 전제로 카운트하지만, 그 tag를 생성/푸시하는 코드가 없었다. +**Fix:** 배포 후 release tag `v${VITE_APP_VERSION}` (e.g. `v2026.08.07.1.abc1234567`)를 자동 생성/푸시. +**Workflow:** `.gitea/workflows/deploy.yml` - 새 스텝 "Tag release version" 추가; permissions.contents = write.