diff --git a/Makefile b/Makefile index 581c469f5..788de8826 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ export PATH := ./bin:$(PATH) # Install all the build and lint dependencies setup: + rm -rf $$GOPATH/src/golang.org/x/tools go get -u golang.org/x/tools/cmd/stringer go get -u golang.org/x/tools/cmd/cover # TODO: temporary hack for https://github.com/golang/go/issues/21387 diff --git a/internal/tmpl/tmpl_test.go b/internal/tmpl/tmpl_test.go index 9926e03d2..3bcd0531a 100644 --- a/internal/tmpl/tmpl_test.go +++ b/internal/tmpl/tmpl_test.go @@ -18,18 +18,6 @@ func TestWithArtifact(t *testing.T) { } ctx.Version = "1.0.0" ctx.Git.CurrentTag = "v1.0.0" - var instance = New(ctx).WithArtifact( - artifact.Artifact{ - Name: "not-this-binary", - Goarch: "amd64", - Goos: "linux", - Goarm: "6", - Extra: map[string]string{ - "Binary": "binary", - }, - }, - map[string]string{"linux": "Linux"}, - ) for expect, tmpl := range map[string]string{ "bar": "{{.Env.FOO}}", "Linux": "{{.Os}}", @@ -44,7 +32,18 @@ func TestWithArtifact(t *testing.T) { expect := expect t.Run(expect, func(tt *testing.T) { tt.Parallel() - result, err := instance.Apply(tmpl) + result, err := New(ctx).WithArtifact( + artifact.Artifact{ + Name: "not-this-binary", + Goarch: "amd64", + Goos: "linux", + Goarm: "6", + Extra: map[string]string{ + "Binary": "binary", + }, + }, + map[string]string{"linux": "Linux"}, + ).Apply(tmpl) assert.NoError(tt, err) assert.Equal(tt, expect, result) })