|
| 1 | +# Release Checklist |
| 2 | + |
| 3 | +Mandatory checklist for version bump and release. **Every version bump MUST follow this checklist.** |
| 4 | + |
| 5 | +> **Incident:** v5.2.0 release failed because `version.ts` and `plugin/package.json` were not bumped. |
| 6 | +> CI caught the mismatch, but the manual review missed it. |
| 7 | +
|
| 8 | +## Version Files — Complete List |
| 9 | + |
| 10 | +All files below MUST have matching versions. **Missing even one will fail the release CI.** |
| 11 | + |
| 12 | +| # | File | Purpose | Auto-sync? | |
| 13 | +|---|------|---------|-----------| |
| 14 | +| 1 | `apps/mcp-server/package.json` | MCP server version (primary source) | Manual | |
| 15 | +| 2 | `apps/mcp-server/src/shared/version.ts` | Runtime VERSION constant | Manual | |
| 16 | +| 3 | `packages/rules/package.json` | Rules package version | Manual | |
| 17 | +| 4 | `packages/claude-code-plugin/package.json` | Plugin package version | `sync-version` script | |
| 18 | +| 5 | `packages/claude-code-plugin/.claude-plugin/plugin.json` | Plugin manifest version | `sync-version` script | |
| 19 | + |
| 20 | +## Bump Procedure |
| 21 | + |
| 22 | +### Step 1: Bump primary source |
| 23 | + |
| 24 | +Edit `apps/mcp-server/package.json` → update `version` field. |
| 25 | + |
| 26 | +### Step 2: Bump version.ts |
| 27 | + |
| 28 | +Edit `apps/mcp-server/src/shared/version.ts` → update `VERSION` constant. |
| 29 | + |
| 30 | +### Step 3: Bump rules package |
| 31 | + |
| 32 | +Edit `packages/rules/package.json` → update `version` field. |
| 33 | + |
| 34 | +### Step 4: Run sync-version |
| 35 | + |
| 36 | +```bash |
| 37 | +yarn workspace codingbuddy-claude-plugin sync-version |
| 38 | +``` |
| 39 | + |
| 40 | +This automatically syncs: |
| 41 | +- `packages/claude-code-plugin/package.json` (version + peerDependencies) |
| 42 | +- `packages/claude-code-plugin/.claude-plugin/plugin.json` (version) |
| 43 | + |
| 44 | +### Step 5: Verify — MANDATORY |
| 45 | + |
| 46 | +```bash |
| 47 | +# Run this BEFORE committing. All must show the same version. |
| 48 | +VERSION="X.Y.Z" |
| 49 | +echo "Checking all version files for $VERSION..." |
| 50 | + |
| 51 | +grep -q "\"version\": \"$VERSION\"" apps/mcp-server/package.json && echo "✅ mcp-server" || echo "❌ mcp-server" |
| 52 | +grep -q "VERSION = '$VERSION'" apps/mcp-server/src/shared/version.ts && echo "✅ version.ts" || echo "❌ version.ts" |
| 53 | +grep -q "\"version\": \"$VERSION\"" packages/rules/package.json && echo "✅ rules" || echo "❌ rules" |
| 54 | +grep -q "\"version\": \"$VERSION\"" packages/claude-code-plugin/package.json && echo "✅ plugin pkg" || echo "❌ plugin pkg" |
| 55 | +grep -q "\"version\": \"$VERSION\"" packages/claude-code-plugin/.claude-plugin/plugin.json && echo "✅ plugin manifest" || echo "❌ plugin manifest" |
| 56 | + |
| 57 | +# No remaining old version |
| 58 | +grep -rn "OLD_VERSION" --include="*.ts" --include="*.json" apps/ packages/ | grep -v node_modules | grep -v CHANGELOG && echo "❌ OLD VERSION FOUND" || echo "✅ Clean" |
| 59 | +``` |
| 60 | + |
| 61 | +### Step 6: Commit + PR |
| 62 | + |
| 63 | +```bash |
| 64 | +git add -A |
| 65 | +git commit -m "chore: bump version to X.Y.Z" |
| 66 | +# Create PR, wait for CI, merge |
| 67 | +``` |
| 68 | + |
| 69 | +### Step 7: Tag (user only) |
| 70 | + |
| 71 | +```bash |
| 72 | +git tag vX.Y.Z |
| 73 | +git push origin vX.Y.Z |
| 74 | +``` |
| 75 | + |
| 76 | +## Common Mistakes |
| 77 | + |
| 78 | +| Mistake | Prevention | |
| 79 | +|---------|-----------| |
| 80 | +| Forgot `version.ts` | Step 2 is explicit — version.ts is separate from package.json | |
| 81 | +| Forgot `plugin/package.json` | Step 4 `sync-version` handles this automatically | |
| 82 | +| Forgot to run `sync-version` | Step 4 is a separate explicit step | |
| 83 | +| Version mismatch between files | Step 5 verification catches this | |
| 84 | +| Old version remains in codebase | Step 5 grep check catches this | |
| 85 | + |
| 86 | +## CI Validation |
| 87 | + |
| 88 | +The `release.yml` workflow validates all version files match the git tag. |
| 89 | +If any mismatch is found, the release fails with a clear error message listing which files are wrong. |
0 commit comments