git-lfs/config/version.go

35 lines
481 B
Go
Raw Normal View History

package config
import (
"fmt"
"runtime"
"strings"
2016-12-20 22:46:45 +00:00
"github.com/git-lfs/git-lfs/lfsapi"
)
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,
)
2016-12-20 22:46:45 +00:00
lfsapi.UserAgent = VersionDesc
}