vendor: Bump github.com/containers/buildah from 1.22.3 to 1.23.0

[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
This commit is contained in:
Aditya Rajan
2021-09-15 13:30:44 +05:30
parent 323fe36313
commit 222b62e7b0
25 changed files with 269 additions and 106 deletions

View File

@@ -10,7 +10,7 @@ import (
"golang.org/x/sync/semaphore"
)
// CommonBuildOptions are resources that can be defined by flags for both buildah from and build-using-dockerfile
// CommonBuildOptions are resources that can be defined by flags for both buildah from and build
type CommonBuildOptions struct {
// AddHost is the list of hostnames to add to the build container's /etc/hosts.
AddHost []string

View File

@@ -6,6 +6,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
urlpkg "net/url"
"os"
"os/exec"
"path"
@@ -28,7 +29,7 @@ const (
Package = "buildah"
// Version for the Package. Bump version in contrib/rpm/buildah.spec
// too.
Version = "1.23.0-dev"
Version = "1.23.0"
// DefaultRuntime if containers.conf fails.
DefaultRuntime = "runc"
@@ -111,7 +112,11 @@ func TempDirForURL(dir, prefix, url string) (name string, subdir string, err err
if err != nil {
return "", "", errors.Wrapf(err, "error creating temporary directory for %q", url)
}
if strings.HasPrefix(url, "git://") || strings.HasSuffix(url, ".git") {
urlParsed, err := urlpkg.Parse(url)
if err != nil {
return "", "", errors.Wrapf(err, "error parsing url %q", url)
}
if strings.HasPrefix(url, "git://") || strings.HasSuffix(urlParsed.Path, ".git") {
err = cloneToDirectory(url, name)
if err != nil {
if err2 := os.RemoveAll(name); err2 != nil {
@@ -156,9 +161,6 @@ func TempDirForURL(dir, prefix, url string) (name string, subdir string, err err
}
func cloneToDirectory(url, dir string) error {
if !strings.HasPrefix(url, "git://") && !strings.HasSuffix(url, ".git") {
url = "git://" + url
}
gitBranch := strings.Split(url, "#")
var cmd *exec.Cmd
if len(gitBranch) < 2 {