Skip to content

chore(release skill): fix tag SHA check, last-tag discovery, hex.publish reality - #22

Merged
milmazz merged 1 commit into
mainfrom
chore/release-skill-fixes
May 10, 2026
Merged

chore(release skill): fix tag SHA check, last-tag discovery, hex.publish reality#22
milmazz merged 1 commit into
mainfrom
chore/release-skill-fixes

Conversation

@milmazz

@milmazz milmazz commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

Three fixes to .claude/commands/release.md learned from the v0.5.0 release:

  • Phase 3 — LAST_TAG discovery. git describe --tags --abbrev=0 skips lightweight tags and silently picks an older annotated tag (v0.4.0 / v0.4.1 in this repo were lightweight, so it returned v0.3.0). Switch to git tag --sort=-v:refname | head -1.
  • Phase 6 — tag SHA verification was always wrong for annotated tags. Comparing gh api .../git/refs/tags/X --jq .object.sha (the tag-object SHA) to git rev-parse vX.Y.Z^{} (the commit SHA) is apples-to-oranges. Verify both layers: tag-object SHA against git rev-parse vX.Y.Z, then dereference via gh api .../git/tags/<sha> for the commit SHA.
  • Phase 6 — mix hex.publish reality. Blocks on Proceed? [Yn] and a 2FA code, neither of which can be supplied through Claude Code's Bash tool. Make explicit that the user must run it in their own terminal.

Test plan

  • Renders cleanly when read by /release next time around
  • No code changes — markdown only, no library impact

…ex.publish reality

- Phase 3: replace 'git describe --tags --abbrev=0' (skips lightweight
  tags, silently picks an older annotated tag — v0.4.0/v0.4.1 in this
  repo were lightweight) with 'git tag --sort=-v:refname | head -1'.
- Phase 6: comparing 'gh api .../git/refs/tags/X --jq .object.sha' to
  'git rev-parse X^{}' is always a mismatch for annotated tags (the
  former is the tag-object SHA, the latter is the commit SHA). Verify
  both layers explicitly: tag-object SHA against 'git rev-parse X',
  then dereference via 'gh api .../git/tags/<sha>' for the commit SHA.
- Phase 6: 'mix hex.publish' blocks on 'Proceed? [Yn]' AND a 2FA code,
  neither of which can be driven through Claude Code's Bash tool.
  Spell out that the user must run it in their own terminal.
@milmazz
milmazz merged commit 1bce576 into main May 10, 2026
5 checks passed
@milmazz
milmazz deleted the chore/release-skill-fixes branch May 10, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant