Files
interrupt/version/version.go
Loki Verloren 39c743f551 update *yawn*
2021-04-30 20:22:27 +02:00

49 lines
1.3 KiB
Go

package version
//go:generate go run ./update/.
import (
"fmt"
)
var (
// URL is the git URL for the repository
URL = "github.com/p9c/interrupt"
// GitRef is the gitref, as in refs/heads/branchname
GitRef = "refs/heads/main"
// GitCommit is the commit hash of the current HEAD
GitCommit = "0b9edd924034775ae337ca15a00a20629ff130c3"
// BuildTime stores the time when the current binary was built
BuildTime = "2021-04-30T19:56:38+02:00"
// Tag lists the Tag on the build, adding a + to the newest Tag if the commit is
// not that commit
Tag = "v0.0.4"
// PathBase is the path base returned from runtime caller
PathBase = "/home/loki/src/github.com/p9c/pod/pkg/interrupt/"
// Major is the major number from the tag
Major = 0
// Minor is the minor number from the tag
Minor = 0
// Patch is the patch version number from the tag
Patch = 4
// Meta is the extra arbitrary string field from Semver spec
Meta = ""
)
// Get returns a pretty printed version information string
func Get() string {
return fmt.Sprint(
"\nRepository Information\n"+
"\tGit repository: "+URL+"\n",
"\tBranch: "+GitRef+"\n"+
"\tCommit: "+GitCommit+"\n"+
"\tBuilt: "+BuildTime+"\n"+
"\tTag: "+Tag+"\n",
"\tMajor:", Major, "\n",
"\tMinor:", Minor, "\n",
"\tPatch:", Patch, "\n",
"\tMeta: ", Meta, "\n",
)
}