1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
Carlos Alexandro Becker 962429de06
fix(custom_publishers): skip publish is check by publish pipe (#4274)
the publish pipe, which runs all publishers, already skips all
publishers if skip publish is set, so this check is not needed here.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-04 16:21:11 -03:00

15 lines
532 B
Go

// Package custompublishers provides a Pipe that executes a custom publisher
package custompublishers
import (
"github.com/goreleaser/goreleaser/internal/exec"
"github.com/goreleaser/goreleaser/pkg/context"
)
// Pipe for custom publisher.
type Pipe struct{}
func (Pipe) String() string { return "custom publisher" }
func (Pipe) Skip(ctx *context.Context) bool { return len(ctx.Config.Publishers) == 0 }
func (Pipe) Publish(ctx *context.Context) error { return exec.Execute(ctx, ctx.Config.Publishers) }