Documentation
¶
Overview ¶
Package version exposes the build version shared by all tie binaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "dev"
Version is the build version. It is overridden at build time via
-ldflags "-X github.com/uidbz/tie/version.Version=v0.4.0"
(see the Makefile, which injects `git describe --tags --always --dirty`). When built without that flag the binary's embedded build info is used instead: the module version for a `go install pkg@version` build, else the VCS commit Go records for any build from a git checkout.
Functions ¶
Types ¶
type Info ¶ added in v0.5.3
type Info struct {
// Version is the human-readable version: a tag (v0.5.2), a git description
// (v0.5.2-3-g174d68f), a module pseudo-version, or a bare short commit —
// suffixed "-dirty" when built from a modified tree without ldflags.
Version string `json:"version"`
// Commit is the full VCS revision when the build info carries one.
Commit string `json:"commit,omitempty"`
// Date is the commit timestamp (RFC 3339) when known.
Date string `json:"date,omitempty"`
// Dirty reports uncommitted changes in the tree the binary was built from.
Dirty bool `json:"dirty,omitempty"`
// GoVersion is the toolchain that built the binary.
GoVersion string `json:"goVersion"`
}
Info describes the running build.
Click to show internal directories.
Click to hide internal directories.