Skip to content

fix(github): Skip prereleases and ignore floating tags in version lookup - #969

Merged
BYK merged 2 commits into
masterfrom
fix/floating-tags-prerelease-and-lookup
Nov 6, 2026
Merged

BYK merged 2 commits into
masterfrom
fix/floating-tags-prerelease-and-lookup

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Fixes two floatingTags bugs that keep repos with v-prefixed release tags from using it.

Prereleases moved floating tags. updateFloatingTags had no prerelease check, so a pre release like 0.54.0-alpha.0 moved v0 to 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 matches v0. When v0 and v0.53.0 are on the same commit, git picks v0, Craft can't parse a version from it, and auto computes from 0.0.0 (a vitest-evals dry run gave 0.0.0 -> 0.1.0). findLatestTag now 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. getLatestTag goes through it too, so prepare, auto/pre versioning, the changelog base, and craft changelog all 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 v0 and latest sit on the v0.53.0 commit, which now resolves to v0.53.0 for every lookup. The GitHub target docs mention both behaviors.

This unblocks getsentry/warden#567 and getsentry/vitest-evals#117 replacing their update-major-tag.sh scripts with floatingTags: ["v{major}"].

via @BYK.

--

View Session [Sentry]

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>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-11-06 14:26 UTC

Comment thread docs/src/content/docs/targets/github.md Resolved
@BYK
BYK merged commit 064af7c into master Nov 6, 2026
39 of 40 checks passed
@BYK
BYK deleted the fix/floating-tags-prerelease-and-lookup branch November 6, 2026 14:25
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