From c63a57eaa05d79c619cfc9825e973006bb59bfc0 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 8 Jan 2020 09:38:14 -0300 Subject: [PATCH] fix: do not set default builds closes https://github.com/goreleaser/goreleaser/issues/1294 Signed-off-by: Carlos Alexandro Becker --- internal/pipe/docker/docker.go | 5 ----- internal/pipe/docker/docker_test.go | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/pipe/docker/docker.go b/internal/pipe/docker/docker.go index 1ff46eede..dc4d818df 100644 --- a/internal/pipe/docker/docker.go +++ b/internal/pipe/docker/docker.go @@ -55,11 +55,6 @@ func (Pipe) Default(ctx *context.Context) error { ctx.Config.Builds[0].Binary, } } - if len(ctx.Config.Dockers[0].Builds) == 0 { - ctx.Config.Dockers[0].Builds = []string{ - ctx.Config.Builds[0].ID, - } - } if ctx.Config.Dockers[0].Dockerfile == "" { ctx.Config.Dockers[0].Dockerfile = "Dockerfile" } diff --git a/internal/pipe/docker/docker_test.go b/internal/pipe/docker/docker_test.go index 296217793..858699132 100644 --- a/internal/pipe/docker/docker_test.go +++ b/internal/pipe/docker/docker_test.go @@ -723,6 +723,7 @@ func TestDefault(t *testing.T) { assert.Equal(t, "linux", docker.Goos) assert.Equal(t, "amd64", docker.Goarch) assert.Equal(t, []string{ctx.Config.Builds[0].Binary}, docker.Binaries) + assert.Empty(t, docker.Builds) } func TestDefaultBinaries(t *testing.T) {