Documentation
¶
Overview ¶
Package version provides the canonical version string for yaad.
Single source of truth: the VERSION file at the repo root, which is kept in sync with the co-located internal/version/VERSION via the `make tidy` target (or `release-please`, which bumps both atomically).
The co-located VERSION file is embedded at compile time via `go:embed`, so `go build`, `go install`, and `go get` all see the correct version with zero ldflags wiring required. Release builds (goreleaser, or `make build` if a binary is ever added) may additionally inject a short commit + build date through ldflags:
go build -ldflags " \ -X github.com/GrayCodeAI/yaad/internal/version.Commit=$(git rev-parse --short HEAD) \ -X github.com/GrayCodeAI/yaad/internal/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
Do NOT edit Version directly — bump the root VERSION file and resync the co-located one (or let release-please/goreleaser do it).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Commit = "none"
Commit is the git commit short SHA. Set via ldflags at release time; defaults to "none" for plain `go build`.
var Date = "unknown"
Date is the build date in RFC3339. Set via ldflags at release time; defaults to "unknown" for plain `go build`.
var Version = strings.TrimSpace(versionFile)
Version is the current version of yaad, embedded from the VERSION file at compile time.
Functions ¶
Types ¶
This section is empty.