Skip to content

build: stamp the release version into /api/version via ldflags#362

Merged
aaliboyev merged 1 commit into
mainfrom
build/version-stamp
Jul 2, 2026
Merged

build: stamp the release version into /api/version via ldflags#362
aaliboyev merged 1 commit into
mainfrom
build/version-stamp

Conversation

@aaliboyev

Copy link
Copy Markdown
Member

httpapi.Version becomes a var (default "dev") stamped at image build via the VERSION bake arg (publish.yml already derives it from the pushed tag). Fixes /api/version and the OpenAPI Info block reporting a hardcoded 0.1.0. Verified with bake --print (prod stamps the tag, local stamps "dev") and an ldflags test build.

httpapi.Version becomes a var (default "dev") set at image build with
-X from the VERSION bake arg, which publish.yml already derives from
the pushed tag. Fixes /api/version and the OpenAPI Info block reporting
a hardcoded 0.1.0 on every build. "latest" (the no-tag default) stamps
"dev" rather than masquerading as a version.
@aaliboyev aaliboyev merged commit 6b6eefe into main Jul 2, 2026
2 checks passed
@aaliboyev aaliboyev deleted the build/version-stamp branch July 2, 2026 03:40
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