Short returns a short version number for this build, of the forms: - "x.y.z" for builds distributed by Tailscale or built with build_dist.sh - "x.y.z-devYYYYMMDD" for builds made with plain "go build" or "go install" - "x.y.z-ERR-BuildInfo" for builds made by plain "go run"
()
| 91 | // - "x.y.z-devYYYYMMDD" for builds made with plain "go build" or "go install" |
| 92 | // - "x.y.z-ERR-BuildInfo" for builds made by plain "go run" |
| 93 | func Short() string { |
| 94 | return short.Get(func() string { |
| 95 | if shortStamp != "" { |
| 96 | return shortStamp |
| 97 | } |
| 98 | bi := getEmbeddedInfo() |
| 99 | if !bi.valid { |
| 100 | return strings.TrimSpace(tailscaleroot.VersionDotTxt) + "-ERR-BuildInfo" |
| 101 | } |
| 102 | return strings.TrimSpace(tailscaleroot.VersionDotTxt) + "-dev" + bi.commitDate |
| 103 | }) |
| 104 | } |
| 105 | |
| 106 | type embeddedInfo struct { |
| 107 | valid bool |
searching dependent graphs…