git-lfs/config/version.go
Sebastian Schuberth a8dba91546 config/version: Make the version a constant
There is no reason for it to be variable.
2016-12-08 16:23:17 +01:00

32 lines
411 B
Go

package config
import (
"fmt"
"runtime"
"strings"
)
var (
GitCommit string
VersionDesc string
)
const (
Version = "1.5.0"
)
func init() {
gitCommit := ""
if len(GitCommit) > 0 {
gitCommit = "; git " + GitCommit
}
VersionDesc = fmt.Sprintf("git-lfs/%s (GitHub; %s %s; go %s%s)",
Version,
runtime.GOOS,
runtime.GOARCH,
strings.Replace(runtime.Version(), "go", "", 1),
gitCommit,
)
}