Skip to content

Report the release tag as the version of release builds - #164

Merged
liran merged 2 commits into
mainfrom
build/stamp-release-version
Nov 7, 2026
Merged

liran merged 2 commits into
mainfrom
build/stamp-release-version

Conversation

@liran

@liran liran commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Release images and archives report "version":"dev", because the build injects only the revision. The v0.2.0 image reports local-<sha> from an older build. This adds a VERSION build argument and a -X main.version link 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 report dev, and go install …@vX still reports the module version.

Checked locally: docker build --build-arg VERSION=v0.3.0-test reports v0.3.0-test, a build without it reports dev, and the new unit test covers the injected version.

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.
@liran liran self-assigned this Nov 6, 2026
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.
@liran
liran merged commit 56b193a into main Nov 7, 2026
8 checks passed
@liran
liran deleted the build/stamp-release-version branch November 7, 2026 00:14
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