1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-05 13:15:26 +02:00

fix: goreleaser check (#1249)

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2019-11-15 18:23:11 -03:00 committed by GitHub
parent 0953c2f4f7
commit 65c9c12957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
main.go
View File

@ -11,11 +11,11 @@ import (
"github.com/caarlos0/ctrlc" "github.com/caarlos0/ctrlc"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/goreleaser/goreleaser/internal/middleware" "github.com/goreleaser/goreleaser/internal/middleware"
"github.com/goreleaser/goreleaser/internal/pipe/defaults"
"github.com/goreleaser/goreleaser/internal/pipeline" "github.com/goreleaser/goreleaser/internal/pipeline"
"github.com/goreleaser/goreleaser/internal/static" "github.com/goreleaser/goreleaser/internal/static"
"github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/goreleaser/pkg/context" "github.com/goreleaser/goreleaser/pkg/context"
"github.com/goreleaser/goreleaser/pkg/defaults"
"gopkg.in/alecthomas/kingpin.v2" "gopkg.in/alecthomas/kingpin.v2"
) )
@ -128,12 +128,8 @@ func checkConfig(filename string) error {
} }
var ctx = context.New(cfg) var ctx = context.New(cfg)
return ctrlc.Default.Run(ctx, func() error { return ctrlc.Default.Run(ctx, func() error {
for _, pipe := range defaults.Defaulters { log.Info(color.New(color.Bold).Sprint("checking config:"))
if err := middleware.ErrHandler(pipe.Default)(ctx); err != nil { return defaults.Pipe{}.Run(ctx)
return err
}
}
return nil
}) })
} }