Skip to content

fix: use version-sorted tags for release bump - #79

Merged
mikemadeja merged 2 commits into
mainfrom
develop
Sep 18, 2026
Merged

mikemadeja merged 2 commits into
mainfrom
develop

Conversation

@mikemadeja

Copy link
Copy Markdown
Owner

Summary

Fixes the release workflow failure from the last develop->main merge (#77), where CreateRelease.yml failed with fatal: tag 'v0.0.21' already exists.

Root cause: the workflow used git describe --tags --abbrev=0, which finds the nearest tag by commit-graph reachability from HEAD. Two tags, v0.0.20 and v0.0.21, both point at the same commit (leftover from a prior re-run), so describe returned the wrong one, the bump logic recomputed v0.0.21, and tag creation failed since it already existed.

This switches to git tag --list 'v*' --sort=-v:refname | head -n 1, which finds the true highest existing version tag regardless of which commit it's attached to. Merging this should let the release run successfully and cut v0.0.22.

Test plan

  • Ran the new tag-selection command locally — correctly returns v0.0.21 (the true latest) instead of the value git describe picked
  • Confirm this merge triggers a clean release (v0.0.22)

🤖 Generated with Claude Code

mikemadeja and others added 2 commits September 18, 2026 16:42
git describe --tags --abbrev=0 finds the nearest tag reachable from
HEAD by commit graph, which breaks when multiple tags point to the
same commit (as happened with v0.0.20/v0.0.21, both on the same
commit from a prior re-run). It picked the wrong one, computed a
tag that already existed, and failed the release with "tag already
exists". Sorting all v* tags by version and taking the highest
always finds the true latest release regardless of commit history.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix: use version-sorted tags for release bump
@mikemadeja
mikemadeja merged commit ccc650a into main Sep 18, 2026
2 checks passed
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