version: build-time version package + Makefile ldflags wiring
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// Package version exposes build-time identifying constants. Both the
|
||||
// server and agent link this package; their values are set via
|
||||
// -ldflags during the build. An unset Version falls back to "dev"
|
||||
// so source builds without ldflags still run.
|
||||
package version
|
||||
|
||||
var (
|
||||
// Version is the human-facing release string, e.g. "v1.2.3" or
|
||||
// "v1.2.3-dirty". Compared byte-for-byte between agent and
|
||||
// server to drive the "out of date" signal.
|
||||
Version = "dev"
|
||||
|
||||
// Commit is the short git SHA. Informational only; surfaced via
|
||||
// /api/version but not used for any comparison.
|
||||
Commit = ""
|
||||
)
|
||||
Reference in New Issue
Block a user