1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-16 03:52:12 +02:00

fix(docker): remove --builder=default from default args when use=buildx (#4566)

refs #4392

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2024-01-22 20:27:40 -03:00 committed by GitHub
parent c6bc25ca69
commit 2ced7acdd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ func (i dockerImager) Build(ctx *context.Context, root string, images, flags []s
func (i dockerImager) buildCommand(images, flags []string) []string {
base := []string{"build", "."}
if i.buildx {
base = []string{"buildx", "--builder", "default", "build", ".", "--load"}
base = []string{"buildx", "build", ".", "--load"}
}
for _, image := range images {
base = append(base, "-t", image)

View File

@ -1113,7 +1113,7 @@ func TestBuildCommand(t *testing.T) {
name: "buildx",
buildx: true,
flags: []string{"--label=foo", "--build-arg=bar=baz"},
expect: []string{"buildx", "--builder", "default", "build", ".", "--load", "-t", images[0], "-t", images[1], "--label=foo", "--build-arg=bar=baz"},
expect: []string{"buildx", "build", ".", "--load", "-t", images[0], "-t", images[1], "--label=foo", "--build-arg=bar=baz"},
},
}
for _, tt := range tests {