Repository navigation
fix(update): offer the next release to a build whose version only carries build metadata - #1023
Merged
Merged
Conversation
…ries build metadata
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.
Why
semver.IsReleaserefused 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
IsReleasedrops 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 as1.2.0+xis now accepted; two versions that differ only after the+compare equal.semver_test.go:IsRelease("1.0.0+build.5")now expectstrue, because the contract changed.Test plan
TestStatus: a0.7.0+local.3build is offered0.8.0(fails without the fix), and a0.7.0-5-gabc123build is notgofmt -l .,go vet ./...,go test ./...