vendor: update buildkit to master@31c870e82a48

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-05-15 18:32:31 +01:00
parent 167cd16acb
commit e61a8cf637
269 changed files with 25798 additions and 3371 deletions

View File

@ -17,11 +17,6 @@
package version
import (
"regexp"
"sync"
)
const (
defaultVersion = "v0.0.0+unknown"
)
@ -37,26 +32,3 @@ var (
// the program at linking time.
Revision = ""
)
var (
reRelease *regexp.Regexp
reDev *regexp.Regexp
reOnce sync.Once
)
func UserAgent() string {
uaVersion := defaultVersion
reOnce.Do(func() {
reRelease = regexp.MustCompile(`^(v[0-9]+\.[0-9]+)\.[0-9]+$`)
reDev = regexp.MustCompile(`^(v[0-9]+\.[0-9]+)\.[0-9]+`)
})
if matches := reRelease.FindAllStringSubmatch(Version, 1); len(matches) > 0 {
uaVersion = matches[0][1]
} else if matches := reDev.FindAllStringSubmatch(Version, 1); len(matches) > 0 {
uaVersion = matches[0][1] + "-dev"
}
return "buildkit/" + uaVersion
}