Determine the release tag by version, not commit date - #177
Merged
Conversation
`git rev-list --tags --max-count=1` returns the most recently committed tagged commit, which is not necessarily the highest version number. v1.27 was tagged on a 2026-04-23 commit while v1.28 was tagged on an older 2026-04-10 commit, so the old logic picked v1.27 and computed a next tag of v1.28 -- which already existed. Because a draft release does not create its tag until it is published, this produced a draft that looked fine and would only have failed at publish time. Sorting with `--sort=-v:refname` gives v1.28, so the next tag is v1.29. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bjwebb
approved these changes
Aug 4, 2026
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.
git rev-list --tags --max-count=1returns the most recently committed tagged commit, which is not necessarily the highest version number:So the old logic picked
v1.27and computed a next tag ofv1.28— which already existed. Yesterday's release run did exactly this.Because a draft release doesn't create its tag until published, the collision was invisible: the run went green and produced a draft that would only have failed at publish time. Deleting the v1.28 releases didn't fix it either, since deleting a release leaves its tag behind — the collision would recur on the next run.
Verified against the live tag list
--sort=-v:refnamealso orders the older three-component tags (v1.5.1, v1.7.1) correctly.