Repository navigation
fix(github): Skip prereleases and ignore floating tags in version lookup - #969
Merged
Merged
Conversation
Prereleases no longer move floatingTags, so users pinned to a floating tag like v0 keep getting stable releases only. Previous-release lookups now skip tags without a version after the tag prefix. A floating tag such as v0 on the same commit as v0.53.0 sorted first in git describe and hid the release, so auto versioning restarted from 0.0.0. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Contributor
|
BYK
requested changes
Nov 6, 2026
BYK
approved these changes
Nov 6, 2026
8 tasks done
This was referenced Nov 6, 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.
Fixes two
floatingTagsbugs that keep repos withv-prefixed release tags from using it.Prereleases moved floating tags.
updateFloatingTagshad no prerelease check, so aprerelease like0.54.0-alpha.0movedv0to the alpha for everyone pinned to@v0. It now skips (and logs) when the version has a semver prerelease identifier.Floating tags hid the previous release.
git describe --tags --match 'v*'also matchesv0. Whenv0andv0.53.0are on the same commit, git picksv0, Craft can't parse a version from it, andautocomputes from0.0.0(a vitest-evals dry run gave0.0.0 -> 0.1.0).findLatestTagnow skips tags with no version after the prefix (v0,v0.53,latest) by excluding them and describing again, the same loop it already used to skip prereleases.getLatestTaggoes through it too, soprepare, auto/pre versioning, the changelog base, andcraft changelogall get the fix. Prefixed monorepo tags and prerelease handling are unchanged.Tests cover a prerelease leaving floating tags alone, a stable release still moving them, and a real git repo where
v0andlatestsit on thev0.53.0commit, which now resolves tov0.53.0for every lookup. The GitHub target docs mention both behaviors.This unblocks getsentry/warden#567 and getsentry/vitest-evals#117 replacing their
update-major-tag.shscripts withfloatingTags: ["v{major}"].via @BYK.
--
View Session [Sentry]