-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.go
More file actions
39 lines (30 loc) · 724 Bytes
/
main.go
File metadata and controls
39 lines (30 loc) · 724 Bytes
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
33
34
35
36
37
38
39
package main
import (
"fmt"
"runtime"
"github.com/kriechi/git-monitor/cmd"
)
func main() {
cmd.Execute(buildVersionString())
}
// VersionSuffix is empty for proper releases.
var VersionSuffix = "-dev"
// CurrentVersion represents the current build version.
var CurrentVersion = "0.0.3" + VersionSuffix
// BuildDate is a human-readable timestamp of when this binary was built.
var BuildDate = "2006-01-02T15:04:05Z-0700" // dummy timestamp
func buildVersionString() string {
version := "v" + CurrentVersion
date := BuildDate
if date == "" {
date = "unknown"
}
return fmt.Sprintf(
"%s goos:%s goarch:%s runtime:%s built:%s",
version,
runtime.GOOS,
runtime.GOARCH,
runtime.Version(),
date,
)
}