forked from calibrae-project/spawn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.go
32 lines (28 loc) · 904 Bytes
/
version.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package version
import "fmt"
var (
// URL is the git URL for the repository
URL = "github.com/p9c/duod"
// GitRef is the gitref, as in refs/heads/branchname
GitRef = "refs/heads/master"
// GitCommit is the commit hash of the current HEAD
GitCommit = "3c0d1a4fa0fc34c0dbd93cd4584c8d237e6e168e"
// BuildTime stores the time when the current binary was built
BuildTime = "2021-04-02T00:45:11+02:00"
// Tag lists the Tag on the build, adding a + to the newest Tag if the commit is
// not that commit
Tag = "+"
// PathBase is the path base returned from runtime caller
PathBase = "/home/loki/src/github.com/p9c/duod/"
)
// Get returns a pretty printed version information string
func Get() string {
return fmt.Sprint(
"ParallelCoin Pod\n"+
" git repository: "+URL+"\n",
" branch: "+GitRef+"\n"+
" commit: "+GitCommit+"\n"+
" built: "+BuildTime+"\n"+
" Tag: "+Tag+"\n",
)
}