| 1 | package config |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | "runtime" |
| 6 | "strings" |
| 7 | ) |
| 8 | |
| 9 | var ( |
| 10 | GitCommit string |
| 11 | VersionDesc string |
| 12 | Vendor string |
| 13 | ) |
| 14 | |
| 15 | const ( |
| 16 | Version = "3.8.0" |
| 17 | ) |
| 18 | |
| 19 | func init() { |
| 20 | gitCommit := "" |
| 21 | if len(GitCommit) > 0 { |
| 22 | gitCommit = "; git " + GitCommit |
| 23 | } |
| 24 | if len(Vendor) == 0 { |
| 25 | Vendor = "GitHub" |
| 26 | } |
| 27 | VersionDesc = fmt.Sprintf("git-lfs/%s (%s; %s %s; go %s%s)", |
| 28 | Version, |
| 29 | Vendor, |
| 30 | runtime.GOOS, |
| 31 | runtime.GOARCH, |
| 32 | strings.Replace(runtime.Version(), "go", "", 1), |
| 33 | gitCommit, |
| 34 | ) |
| 35 | } |