diff --git a/go.mod b/go.mod index 30fe67c..f07088c 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( github.com/golangci/golangci-lint v1.43.0 - github.com/goreleaser/goreleaser v1.3.0 + github.com/goreleaser/goreleaser v1.3.1 github.com/justinas/alice v1.2.0 github.com/rs/zerolog v1.20.0 github.com/stretchr/testify v1.7.0 diff --git a/go.sum b/go.sum index 2cd9fc4..d77d666 100644 --- a/go.sum +++ b/go.sum @@ -640,8 +640,8 @@ github.com/goreleaser/chglog v0.1.2 h1:tdzAb/ILeMnphzI9zQ7Nkq+T8R9qyXli8GydD8plF github.com/goreleaser/chglog v0.1.2/go.mod h1:tTZsFuSZK4epDXfjMkxzcGbrIOXprf0JFp47BjIr3B8= github.com/goreleaser/fileglob v1.2.0 h1:OErqbdzeg/eibfDGPHDQDN8jL5u1jNyxA5IQzNPLLoU= github.com/goreleaser/fileglob v1.2.0/go.mod h1:rFyb2pXaK3YdnYnSjn6lifw0h2Q6s8OfOsx6I6bXkKE= -github.com/goreleaser/goreleaser v1.3.0 h1:ycOSnMI9a98TvWKWujy+N2CxHElI36VoS6GM64uIP60= -github.com/goreleaser/goreleaser v1.3.0/go.mod h1:RiKJLXOX4WVDW7whP8hWTkVjzrjund6wXDzjBCCQpz0= +github.com/goreleaser/goreleaser v1.3.1 h1:SXMrtwwmKfoAdxvaBqFTxZcIn//JFYP2wG0yfrT6zfQ= +github.com/goreleaser/goreleaser v1.3.1/go.mod h1:RiKJLXOX4WVDW7whP8hWTkVjzrjund6wXDzjBCCQpz0= github.com/goreleaser/nfpm/v2 v2.11.3 h1:FoPqUv5HAcyTp76LQCvhX4ZhG1UdeClxjmYlwiWXb/k= github.com/goreleaser/nfpm/v2 v2.11.3/go.mod h1:JDzAE2Jy8WsqZu4d7MIl6vhHTbc8ESZgqpfTA0hKdLQ= github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= diff --git a/vendor/github.com/goreleaser/goreleaser/internal/builders/golang/build.go b/vendor/github.com/goreleaser/goreleaser/internal/builders/golang/build.go index 079f776..e12eab2 100644 --- a/vendor/github.com/goreleaser/goreleaser/internal/builders/golang/build.go +++ b/vendor/github.com/goreleaser/goreleaser/internal/builders/golang/build.go @@ -71,22 +71,6 @@ func (*Builder) WithDefaults(build config.Build) (config.Build, error) { // Build builds a golang build. func (*Builder) Build(ctx *context.Context, build config.Build, options api.Options) error { - tpl := tmpl.New(ctx) - if build.Main != "" { - m, err := tpl.Apply(build.Main) - if err != nil { - return err - } - build.Main = m - } - if build.UnproxiedMain != "" { - m, err := tpl.Apply(build.UnproxiedMain) - if err != nil { - return err - } - build.UnproxiedMain = m - } - if err := checkMain(build); err != nil { return err } diff --git a/vendor/github.com/goreleaser/goreleaser/internal/pipe/gomod/gomod proxy.go b/vendor/github.com/goreleaser/goreleaser/internal/pipe/gomod/gomod_proxy.go similarity index 100% rename from vendor/github.com/goreleaser/goreleaser/internal/pipe/gomod/gomod proxy.go rename to vendor/github.com/goreleaser/goreleaser/internal/pipe/gomod/gomod_proxy.go diff --git a/vendor/github.com/goreleaser/goreleaser/internal/pipe/prebuild/prebuild.go b/vendor/github.com/goreleaser/goreleaser/internal/pipe/prebuild/prebuild.go new file mode 100644 index 0000000..09532d4 --- /dev/null +++ b/vendor/github.com/goreleaser/goreleaser/internal/pipe/prebuild/prebuild.go @@ -0,0 +1,30 @@ +// Package prebuild provides a pipe that runs before the build and gomod pipes, mainly to resolve common templates. +package prebuild + +import ( + "github.com/goreleaser/goreleaser/internal/tmpl" + "github.com/goreleaser/goreleaser/pkg/context" +) + +// Pipe for build. +type Pipe struct{} + +func (Pipe) String() string { + return "build prerequisites" +} + +// Run the pipe. +func (Pipe) Run(ctx *context.Context) error { + tpl := tmpl.New(ctx) + for i := range ctx.Config.Builds { + m, err := tpl.Apply(ctx.Config.Builds[i].Main) + if err != nil { + return err + } + if m == "" { + m = "." + } + ctx.Config.Builds[i].Main = m + } + return nil +} diff --git a/vendor/github.com/goreleaser/goreleaser/internal/pipeline/pipeline.go b/vendor/github.com/goreleaser/goreleaser/internal/pipeline/pipeline.go index d8da0d8..719bfe5 100644 --- a/vendor/github.com/goreleaser/goreleaser/internal/pipeline/pipeline.go +++ b/vendor/github.com/goreleaser/goreleaser/internal/pipeline/pipeline.go @@ -22,6 +22,7 @@ import ( "github.com/goreleaser/goreleaser/internal/pipe/gomod" "github.com/goreleaser/goreleaser/internal/pipe/krew" "github.com/goreleaser/goreleaser/internal/pipe/nfpm" + "github.com/goreleaser/goreleaser/internal/pipe/prebuild" "github.com/goreleaser/goreleaser/internal/pipe/publish" "github.com/goreleaser/goreleaser/internal/pipe/sbom" "github.com/goreleaser/goreleaser/internal/pipe/scoop" @@ -53,6 +54,7 @@ var BuildPipeline = []Piper{ snapshot.Pipe{}, // snapshot version handling dist.Pipe{}, // ensure ./dist is clean gomod.Pipe{}, // setup gomod-related stuff + prebuild.Pipe{}, // run prebuild stuff gomod.ProxyPipe{}, // proxy gomod if needed effectiveconfig.Pipe{}, // writes the actual config (with defaults et al set) to dist changelog.Pipe{}, // builds the release changelog diff --git a/vendor/modules.txt b/vendor/modules.txt index 2485345..687a07b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -539,7 +539,7 @@ github.com/gordonklaus/ineffassign/pkg/ineffassign github.com/goreleaser/chglog # github.com/goreleaser/fileglob v1.2.0 github.com/goreleaser/fileglob -# github.com/goreleaser/goreleaser v1.3.0 +# github.com/goreleaser/goreleaser v1.3.1 ## explicit github.com/goreleaser/goreleaser github.com/goreleaser/goreleaser/cmd @@ -586,6 +586,7 @@ github.com/goreleaser/goreleaser/internal/pipe/linkedin github.com/goreleaser/goreleaser/internal/pipe/mattermost github.com/goreleaser/goreleaser/internal/pipe/milestone github.com/goreleaser/goreleaser/internal/pipe/nfpm +github.com/goreleaser/goreleaser/internal/pipe/prebuild github.com/goreleaser/goreleaser/internal/pipe/project github.com/goreleaser/goreleaser/internal/pipe/publish github.com/goreleaser/goreleaser/internal/pipe/reddit