fix: use version-sorted tags for release bump - #79
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the release workflow failure from the last develop->main merge (#77), where
CreateRelease.ymlfailed withfatal: 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.20andv0.0.21, both point at the same commit (leftover from a prior re-run), sodescribereturned the wrong one, the bump logic recomputedv0.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 cutv0.0.22.Test plan
v0.0.21(the true latest) instead of the valuegit describepicked🤖 Generated with Claude Code