1
0
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:
Carlos Alexandro Becker 2024-12-01 17:52:13 -03:00
parent 570af99efe
commit 79d89cb0ec
No known key found for this signature in database
2 changed files with 10 additions and 1 deletions

View File

@ -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 {

View File

@ -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"}