Documentation
¶
Overview ¶
Package version works out which git-stack this binary is.
Three sources are tried in order: the value goreleaser stamps in with ldflags at release time, the module version recorded by `go install github.com/DomBlack/git-stack@vX.Y.Z`, and finally the VCS details that `go build` records for a checkout, so a dev build still says which commit it came from.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct {
// Version is "vX.Y.Z" for a release, a pseudo version for `go install
// @main`, or "dev" for a local build.
Version string `json:"version"`
// Release is true when Version names a published release that
// `git stack update` can compare against.
Release bool `json:"release"`
// Commit is the short VCS revision when known.
Commit string `json:"commit,omitempty"`
// Date is the commit date (YYYY-MM-DD) when known.
Date string `json:"date,omitempty"`
// Dirty is true when the checkout had uncommitted changes.
Dirty bool `json:"dirty,omitempty"`
GoVersion string `json:"go"`
OS string `json:"os"`
Arch string `json:"arch"`
}
Info describes the running binary.