Skip to content

Commit d01c3df

Browse files
cliffhallclaude
andcommitted
docs(release): cut the release branches into worktrees too
The release skill's audit, hand-run CalVer and merge-branch recipes still ran git switch -c in the shared checkout, contradicting the new rule. Each now uses the pr-flow worktree form, and close-out removes them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 3875197 commit d01c3df

1 file changed

Lines changed: 21 additions & 8 deletions

File tree

‎.claude/skills/release/SKILL.md‎

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,21 @@ branch and reach `main` with everything else. **All are merged before the merge
6969
PR is opened.** A milestone that touches only one language, with a clean audit,
7070
has one.
7171

72+
Each branch this skill cuts by hand (the audit, the hand-run CalVer stamp, the
73+
merge branch) goes into **its own sibling worktree**, as `/pr-flow` step 2
74+
does, never by switching branches in the primary checkout. Run each recipe from
75+
the primary checkout; the worktree is named for the checkout, the release
76+
issue and the branch's role, since one issue owns several branches.
77+
7278
### 2a. The audit
7379

7480
Audit first, so the version bumps sit on a tree that was just checked.
7581

7682
```sh
7783
git fetch origin v2/main
78-
git switch -c "v2/chore/$N-release-audit" origin/v2/main
84+
git worktree add --no-track "../$(basename "$PWD")-$N-audit" \
85+
-b "v2/chore/$N-release-audit" origin/v2/main
86+
cd "../$(basename "$PWD")-$N-audit" && npm install
7987

8088
# npm: one lockfile covers the root and all four TypeScript workspaces.
8189
npm audit --audit-level=high
@@ -197,7 +205,9 @@ the same script:
197205

198206
```sh
199207
git fetch origin v2/main
200-
git switch -c "v2/chore/$N-python-calver-$(date -u +%Y.%-m.%-d)" origin/v2/main
208+
git worktree add --no-track "../$(basename "$PWD")-$N-calver" \
209+
-b "v2/chore/$N-python-calver-$(date -u +%Y.%-m.%-d)" origin/v2/main
210+
cd "../$(basename "$PWD")-$N-calver" && npm install
201211
node scripts/prepare-python-release.mjs # prints "name: old -> new" per stamped package
202212
git commit -s -am "chore: stamp Python CalVer versions for $(date -u +%Y.%-m.%-d)"
203213
```
@@ -216,7 +226,9 @@ PR would then add a second.)
216226

217227
```sh
218228
git fetch origin main v2/main
219-
git switch -c "v2/chore/$N-release-$MILESTONE" origin/v2/main
229+
git worktree add --no-track "../$(basename "$PWD")-$N-merge" \
230+
-b "v2/chore/$N-release-$MILESTONE" origin/v2/main
231+
cd "../$(basename "$PWD")-$N-merge"
220232
```
221233

222234
**The merge's result is the release candidate. Prove it will be `v2/main`'s
@@ -336,8 +348,8 @@ is not optional: if it prints anything but `active`, set it back by hand
336348
337349
Work from a **dedicated worktree** with its own install, so nothing stale from
338350
another branch is tested. It is added **detached** at the pushed merge branch:
339-
the branch itself is still checked out where step 3 created it, and git
340-
refuses to check one branch out twice.
351+
the branch itself is still checked out in step 3's worktree, and git refuses
352+
to check one branch out twice.
341353

342354
```sh
343355
git worktree add --detach ../servers-release "origin/v2/chore/$N-release-$MILESTONE"
@@ -617,9 +629,10 @@ Then close out, by hand, since nothing closed the release issue:
617629
gh issue close "$N" --repo modelcontextprotocol/servers --reason completed
618630
```
619631
620-
Move its card to **Done** (`/board-ops`), remove the worktree
621-
(`git worktree remove ../servers-release`), and tell the maintainer the
622-
milestone can be closed.
632+
Move its card to **Done** (`/board-ops`), remove the worktrees from the
633+
primary checkout (`git worktree remove ../servers-release`, and each
634+
`../<checkout>-$N-<role>` from steps 2 and 3 with its local branch, as in
635+
`/pr-flow` step 10), and tell the maintainer the milestone can be closed.
623636
624637
**If the run failed**, `RELEASING.md` **When a publish fails** has the two
625638
cases: a transient failure is re-run on the same run; a defect is fixed on

0 commit comments

Comments
 (0)