mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
fix: better error handling
This commit is contained in:
parent
570af99efe
commit
79d89cb0ec
@ -113,7 +113,7 @@ func runPipeOnBuild(ctx *context.Context, g semerrgroup.Group, build config.Buil
|
||||
}
|
||||
}
|
||||
if err := doBuild(ctx, build, *opts); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("build failed for '%s': %w", target, err)
|
||||
}
|
||||
if !skips.Any(ctx, skips.PostBuildHooks) {
|
||||
if err := runHook(ctx, *opts, build.Env, build.Hooks.Post); err != nil {
|
||||
|
@ -28,6 +28,15 @@ func (Pipe) Default(ctx *context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Pipe) Skip(ctx *context.Context) bool {
|
||||
for _, b := range ctx.Config.Builds {
|
||||
if b.Builder == "go" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Run the pipe.
|
||||
func (Pipe) Run(ctx *context.Context) error {
|
||||
flags := []string{"list", "-m"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user