2016-05-13 16:38:06 +00:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"runtime"
|
|
|
|
"strings"
|
2016-12-20 22:46:45 +00:00
|
|
|
|
|
|
|
"github.com/git-lfs/git-lfs/lfsapi"
|
2016-05-13 16:38:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
GitCommit string
|
|
|
|
VersionDesc string
|
|
|
|
)
|
|
|
|
|
2016-11-21 21:17:24 +00:00
|
|
|
const (
|
2017-02-09 17:05:17 +00:00
|
|
|
Version = "2.0-pre"
|
2016-11-21 21:17:24 +00:00
|
|
|
)
|
|
|
|
|
2016-05-13 16:38:06 +00:00
|
|
|
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
|
2016-05-13 16:38:06 +00:00
|
|
|
}
|