Documentation
¶
Overview ¶
Package version provides an importable cobra command and a fixed package path location to set compile time version information. To override the default values, set the `-ldflags` flags with the following strings:
sigs.k8s.io/release-utils/version.gitVersion=<GitVersion> sigs.k8s.io/release-utils/version.gitCommit=<GitCommit> sigs.k8s.io/release-utils/version.gitTreeState=<GitTreeState> sigs.k8s.io/release-utils/version.buildDate=<BuildDate>
Example: `go build -ldflags " -X sigs.k8s.io/release-utils/version.gitVersion=v0.4.0-1-g040f53c -X sigs.k8s.io/release-utils/version.gitCommit=040f53c -X sigs.k8s.io/release-utils/version.gitTreeState=dirty -X sigs.k8s.io/release-utils/version.buildDate=2022-02-03T17:30:01Z" .`
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct {
GitVersion string `json:"gitVersion"`
GitCommit string `json:"gitCommit"`
GitTreeState string `json:"gitTreeState"`
BuildDate string `json:"buildDate"`
GoVersion string `json:"goVersion"`
Compiler string `json:"compiler"`
Platform string `json:"platform"`
RhtasVersion string `json:"rhtasVersion`
ASCIIName string `json:"-"`
FontName string `json:"-"`
Name string `json:"-"`
Description string `json:"-"`
}
func GetVersionInfo ¶
func GetVersionInfo() Info
GetVersionInfo represents known information on how this binary was built.
func (*Info) CheckFontName ¶
func (*Info) JSONString ¶
JSONString returns the JSON representation of the version info