Files
bookhoard/internal/version/version.go
T
John O'Keefe 1c1f5cf1bb
Release / build-and-push (push) Successful in 3m1s
feat(version): bake release tag into binary; About card and /health field
The version tag previously existed only in git and the Docker image tag —
the running app had no way to report what build it was. Version is now
injected at build time via -ldflags into internal/version.Version (defaults
to "dev" for local builds), passed by the release workflow as the
APP_VERSION Docker build arg from the pushed tag.

Surfaced in Admin → Settings → About (extensible card for future rows like
disk space) and in the /health JSON response, so deployments can be
verified with curl alone.
2026-09-21 20:21:43 -04:00

11 lines
375 B
Go

package version
// Version is the app version. It defaults to "dev" for local builds and is
// overridden at build time in release images via:
//
// go build -ldflags "-X bookhoard/internal/version.Version=v1.5"
//
// The release workflow passes the git tag (e.g. v1.5) as the APP_VERSION
// Docker build arg, which the Dockerfile forwards to this flag.
var Version = "dev"