removed the pre-upgrade git tags

This commit is contained in:
derekc committed 2026-11-17 00:47:56 -08:00
1 parent 6238619839
commit fbd626837f
1 file changed
+8 -6
+8 -6
View File
@@ -1,5 +1,5 @@
--- ---
description: Audit and update all software and dependencies, test each change, commit individually, write release notes, push description: Audit and update all software and dependencies, test each change, commit individually, write release notes, tag the release, push
argument-hint: "[optional scope, e.g. 'patch and minor only' or 'skip docker']" argument-hint: "[optional scope, e.g. 'patch and minor only' or 'skip docker']"
--- ---
@@ -14,11 +14,10 @@ If this project's CLAUDE.md has an "Updates" section, follow it. It may list tes
## Phase 0: Preflight ## Phase 0: Preflight
1. Run `git status`. If the working tree is not clean, **STOP** and tell me. Do not stash or commit my in-progress work. 1. Run `git status`. If the working tree is not clean, **STOP** and tell me. Do not stash or commit my in-progress work.
2. Note the current branch and confirm it tracks a remote. 2. Note the current branch and confirm it tracks a remote. Record the starting commit (`git rev-parse HEAD`) as `<START_SHA>`. It's the rollback reference for the code.
3. Find out how this project builds, tests, lints, and runs. Check CLAUDE.md, README, package scripts, Makefile, Dockerfile, and docker-compose files. 3. Find out how this project builds, tests, lints, and runs. Check CLAUDE.md, README, package scripts, Makefile, Dockerfile, and docker-compose files.
4. **Run a baseline** of build, tests, lint, and (if possible) a container build, *before changing anything*. Record what passes and what already fails, so that later failures can be traced to a specific update and pre-existing problems aren't blamed on it. 4. **Run a baseline** of build, tests, lint, and (if possible) a container build, *before changing anything*. Record what passes and what already fails, so that later failures can be traced to a specific update and pre-existing problems aren't blamed on it.
5. **Create a rollback point** before changing anything. Use today's date as `<DATE>` (YYYY-MM-DD): 5. **Create a rollback point** before changing anything. Use today's date as `<DATE>` (YYYY-MM-DD):
- **Code:** `git tag pre-update-<DATE>`. Add a suffix like `-2` if that tag already exists.
- **Images:** for each image this project builds or runs (from the Dockerfile and compose files), tag the version currently in use with a **project-scoped** tag: `docker tag <image>:<current-tag> <image>:<current-tag>-pre-update-<PROJECT>-<DATE>` (e.g. `mysql:8.0-pre-update-myapp-2026-11-17`). Shared images like `mysql` or `redis` are often used by several projects on the same server, so the project name keeps one project's rollback tags from overwriting another's. - **Images:** for each image this project builds or runs (from the Dockerfile and compose files), tag the version currently in use with a **project-scoped** tag: `docker tag <image>:<current-tag> <image>:<current-tag>-pre-update-<PROJECT>-<DATE>` (e.g. `mysql:8.0-pre-update-myapp-2026-11-17`). Shared images like `mysql` or `redis` are often used by several projects on the same server, so the project name keeps one project's rollback tags from overwriting another's.
- `<PROJECT>` is the compose project name (`docker compose config --format json` → `name`), or the repo folder name if there is no compose file. Lowercase it and replace anything other than `a-z 0-9 . _ -` with `-`. - `<PROJECT>` is the compose project name (`docker compose config --format json` → `name`), or the repo folder name if there is no compose file. Lowercase it and replace anything other than `a-z 0-9 . _ -` with `-`.
- If the tag already exists (a second run on the same day), add a suffix like `-2`. - If the tag already exists (a second run on the same day), add a suffix like `-2`.
@@ -119,7 +118,7 @@ One or two sentences on what changed and anything notable.
- Build / tests / lint / container build / smoke test results - Build / tests / lint / container build / smoke test results
### Rollback ### Rollback
- Git tag: `pre-update-<DATE>` - Starting commit: `<START_SHA>`
- Image tags: `<image>:<current-tag>-pre-update-<PROJECT>-<DATE>` (list each) - Image tags: `<image>:<current-tag>-pre-update-<PROJECT>-<DATE>` (list each)
- Database backup: path and size, or "not applicable" - Database backup: path and size, or "not applicable"
- Restore command: the exact command for this backup - Restore command: the exact command for this backup
@@ -135,10 +134,13 @@ Commit it as `docs(release-notes): YYYY.MM dependency updates`.
- Before and after test results compared with the baseline - Before and after test results compared with the baseline
- Deferred items - Deferred items
- Anything I need to do manually on deploy (env var changes, DB migrations, volume or permission changes, image re-pulls) - Anything I need to do manually on deploy (env var changes, DB migrations, volume or permission changes, image re-pulls)
3. **Ask me to confirm**, then push the commits and the rollback tag together: `git push && git push origin pre-update-<DATE>`. If any final check fails, don't push. Explain what failed instead. 3. **Ask me to confirm**, then:
- **Create a release tag** on the final commit, named `vYYYY.MM` with the current year and month (e.g. `v2026.11`), matching the release notes file: `git tag -a vYYYY.MM -m "YYYY.MM dependency updates"`. If that tag already exists (a second run in the same month), add a suffix like `-2`. Never move or overwrite an existing release tag.
- Push the commits and the release tag together: `git push && git push origin vYYYY.MM`.
- If any final check fails, don't tag or push. Explain what failed instead.
4. Print the rollback commands specific to this project. Fill in the real tag and image names: 4. Print the rollback commands specific to this project. Fill in the real tag and image names:
- Undo one bad update: `git revert <commit>`, then rebuild and redeploy - Undo one bad update: `git revert <commit>`, then rebuild and redeploy
- Undo the whole run: `git revert --no-edit pre-update-<DATE>..HEAD`, then rebuild and redeploy - Undo the whole run: `git revert --no-edit <START_SHA>..HEAD`, then rebuild and redeploy
- Run the old images immediately: change the image tags in compose to `<current-tag>-pre-update-<PROJECT>-<DATE>`, then `docker compose up -d` - Run the old images immediately: change the image tags in compose to `<current-tag>-pre-update-<PROJECT>-<DATE>`, then `docker compose up -d`
- Restore the database from the backup, only if a schema or data migration happened - Restore the database from the backup, only if a schema or data migration happened
5. Run **Housekeeping** (below) for this project's image tags. 5. Run **Housekeeping** (below) for this project's image tags.