vendor: update buildkit to c78f696

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-04-09 01:15:24 +02:00
parent 43968ffa68
commit 4ee8b14f2a
14 changed files with 1043 additions and 359 deletions

View File

@ -45,18 +45,18 @@ var (
)
func UserAgent() string {
version := defaultVersion
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 {
version = matches[0][1]
} else if matches := reDev.FindAllStringSubmatch(version, 1); len(matches) > 0 {
version = matches[0][1] + "-dev"
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/" + version
return "buildkit/" + uaVersion
}