2020-05-10 17:03:49 +01:00
|
|
|
// 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"
|
|
|
|
)
|
|
|
|
|
2020-05-26 00:48:10 -03:00
|
|
|
// Pipe for custom publisher.
|
2020-05-10 17:03:49 +01:00
|
|
|
type Pipe struct{}
|
|
|
|
|
2023-09-04 16:21:11 -03:00
|
|
|
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) }
|