From fbd626837f18d33a8a58a4984b6fb02ce239ed72 Mon Sep 17 00:00:00 2001 From: Derek Cooper Date: Tue, 17 Nov 2026 00:47:56 -0800 Subject: [PATCH] removed the pre-upgrade git tags --- slash-commands/update-deps.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/slash-commands/update-deps.md b/slash-commands/update-deps.md index f02f587..b9a2b57 100644 --- a/slash-commands/update-deps.md +++ b/slash-commands/update-deps.md @@ -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']" --- @@ -14,11 +14,10 @@ If this project's CLAUDE.md has an "Updates" section, follow it. It may list tes ## 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. -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 ``. 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. 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 `` (YYYY-MM-DD): - - **Code:** `git tag pre-update-`. 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 : :-pre-update--` (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. - `` 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`. @@ -119,7 +118,7 @@ One or two sentences on what changed and anything notable. - Build / tests / lint / container build / smoke test results ### Rollback -- Git tag: `pre-update-` +- Starting commit: `` - Image tags: `:-pre-update--` (list each) - Database backup: path and size, or "not applicable" - 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 - Deferred items - 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-`. 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: - Undo one bad update: `git revert `, then rebuild and redeploy - - Undo the whole run: `git revert --no-edit pre-update-..HEAD`, then rebuild and redeploy + - Undo the whole run: `git revert --no-edit ..HEAD`, then rebuild and redeploy - Run the old images immediately: change the image tags in compose to `-pre-update--`, then `docker compose up -d` - Restore the database from the backup, only if a schema or data migration happened 5. Run **Housekeeping** (below) for this project's image tags.