blob: 15929cecff7f36dd3dfbe2799bee6a624ffffd37 (
plain)
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
|
package version
import (
"fmt"
"runtime"
)
var (
// Version is the current version of gitsyncer
Version = "0.15.6"
// GitCommit is the git commit hash at build time
GitCommit = "unknown"
// BuildDate is the date when the binary was built
BuildDate = "unknown"
// GoVersion is the Go version used to build
GoVersion = runtime.Version()
)
// GetVersion returns the full version string
func GetVersion() string {
return fmt.Sprintf("gitsyncer version %s (commit: %s, built: %s, go: %s)",
Version, GitCommit, BuildDate, GoVersion)
}
// GetShortVersion returns just the version number
func GetShortVersion() string {
return Version
}
|