Repository navigation
Report the release tag as the version of release builds - #164
Merged
Merged
Conversation
Release images and archives reported version dev, since only the revision was injected. The Dockerfile takes a VERSION build argument, the release workflow passes the tag, and the smoke test checks it. Main builds still report dev.
The linker ignores a mistyped -X symbol, so the archive job now runs the linux/amd64 binary and checks its version and revision. The archives take the tag from the release event, like the image. One precedence rule sets the version, and the release docs describe it.
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.
Release images and archives report
"version":"dev", because the build injects only the revision. The v0.2.0 image reportslocal-<sha>from an older build. This adds aVERSIONbuild argument and a-X main.versionlink flag so release builds report their tag. The publish workflow passes the tag only for release events and its smoke test now checks the version too. Builds from main still reportdev, andgo install …@vXstill reports the module version.Checked locally:
docker build --build-arg VERSION=v0.3.0-testreportsv0.3.0-test, a build without it reportsdev, and the new unit test covers the injected version.