Repository navigation
fix: upgrade printed two v's in front of a version that already had one - #313
Merged
Merged
Conversation
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.
This is the follow-up I offered in #312.
upgradeformatted versions asv%s, but amake buildis stamped bygit describe, and that stamp already starts withv. So a build exactly at a tag printedalready vv0.41.2, and the new "is newer" line from #312 printedvv0.41.2-2-gc180322 is newer than v0.41.2. #312's test pinned the first of these, as the review noted. A smallvtaghelper now trims one leadingvbefore adding one back. It is used in all four upgrade messages, and the pinned test now expectsalready v0.41.2plus the "newer" case.The same commit fixes the CHANGELOG line from #312 so it names the case most people will hit: a describe-stamped build (
v0.41.2-2-gc180322,v0.41.2-dirty) counts as after its tag and is left alone, while a real prerelease such as-rc.1is still upgraded. The line also cites the PR number alongside the issue.gofmt, go vet, golangci-lint (0 issues),
go test -race ./...and go build ./... pass locally.