Skip to content

fix(update): offer the next release to a build whose version only carries build metadata - #1023

Merged
omartelo merged 1 commit into
mainfrom
fix/update-check-build-metadata
Nov 4, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/update-check-build-metadata

Conversation

@omartelo

@omartelo omartelo commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Why

semver.IsRelease refused any version with a + in it, so a build of a release that only labels itself (0.83.0+local.3) was taken for a development build: Check for updates and the startup check told it it was on the latest version, whatever was out.

What

IsRelease drops build metadata before it checks the version, as SemVer §10 says it carries no precedence. A pre-release (0.7.0-rc.1) and a build between tags (0.7.0-5-gabc123) are still not releases, and still never offered an update.

Theme packs validate their versions with the same IsRelease, so a pack version such as 1.2.0+x is now accepted; two versions that differ only after the + compare equal.

semver_test.go: IsRelease("1.0.0+build.5") now expects true, because the contract changed.

Test plan

  • TestStatus: a 0.7.0+local.3 build is offered 0.8.0 (fails without the fix), and a 0.7.0-5-gabc123 build is not
  • Backend gate: gofmt -l ., go vet ./..., go test ./...

@omartelo
omartelo merged commit 59458d7 into main Nov 4, 2026
7 checks passed
@omartelo
omartelo deleted the fix/update-check-build-metadata branch November 4, 2026 02:13
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