8d45ae6e3b
pkg/version.Version (default "dev") is set at link time via -ldflags from each service Dockerfile's VERSION build-arg, which the deploy passes as the git tag (git describe --tags). It surfaces as the OpenTelemetry service.version resource attribute (so Grafana/Tempo are version-aware), alongside the SPA's existing About version. Adds the VERSION build-arg to the backend/gateway/validator/bot compose builds and a serviceResource test covering service.name + service.version.
11 lines
582 B
Go
11 lines
582 B
Go
// Package version exposes the build version stamped into every Scrabble service
|
|
// binary. The default is "dev"; release builds override it through the linker
|
|
// (`go build -ldflags "-X scrabble/pkg/version.Version=<value>"`), wired from the
|
|
// VERSION build-arg in each service Dockerfile, which the deploy sets to the git
|
|
// tag (`git describe --tags`). It surfaces as the OpenTelemetry service.version
|
|
// resource attribute (see pkg/telemetry) and the SPA About screen.
|
|
package version
|
|
|
|
// Version is the build version, "dev" unless overridden at link time.
|
|
var Version = "dev"
|