Skip to content

Commit

Permalink
Revert "fix: skip defaults for skipped pipes (#4210)"
Browse files Browse the repository at this point in the history
This reverts commit dccd68c.

This breaks `continue` on goreleaser-pro.

Will re-work this for the next release.
  • Loading branch information
caarlos0 committed Aug 9, 2023
1 parent dccd68c commit 08e307e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions internal/pipe/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/goreleaser/goreleaser/internal/client"
"github.com/goreleaser/goreleaser/internal/middleware/errhandler"
"github.com/goreleaser/goreleaser/internal/middleware/skip"
"github.com/goreleaser/goreleaser/internal/tmpl"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/goreleaser/goreleaser/pkg/defaults"
Expand Down Expand Up @@ -39,10 +38,7 @@ func (Pipe) Run(ctx *context.Context) error {
ctx.Config.GiteaURLs.Download = strings.TrimSuffix(strings.ReplaceAll(apiURL, "/api/v1", ""), "/")
}
for _, defaulter := range defaults.Defaulters {
if err := skip.Maybe(
defaulter,
errhandler.Handle(defaulter.Default),
)(ctx); err != nil {
if err := errhandler.Handle(defaulter.Default)(ctx); err != nil {
return err
}
}
Expand Down
1 change: 0 additions & 1 deletion internal/pipe/defaults/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ func TestFillPartial(t *testing.T) {
require.NotEmpty(t, ctx.Config.Dockers[0].Dockerfile)
require.Equal(t, "disttt", ctx.Config.Dist)
require.NotEqual(t, "https://github.com", ctx.Config.GitHubURLs.Download)
require.Empty(t, ctx.Config.Nix, "nix should have been skipped")

ctx = testctx.NewWithCfg(config.Project{
GiteaURLs: config.GiteaURLs{
Expand Down
2 changes: 1 addition & 1 deletion pkg/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var Defaulters = []Defaulter{
blob.Pipe{},
upload.Pipe{},
aur.Pipe{},
nix.NewPublish(),
nix.Pipe{},
winget.Pipe{},
brew.Pipe{},
krew.Pipe{},
Expand Down

0 comments on commit 08e307e

Please sign in to comment.