1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-19 20:57:53 +02:00
goreleaser/pkg/healthcheck/healthcheck.go
Carlos Alexandro Becker a8916c080e
feat: binary signs (#5018)
this is different from the default signs, in the sense that this will
sign the binaries even if archive mode is not set to binary.

refs https://github.com/orgs/goreleaser/discussions/4989

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-08-03 14:36:54 -03:00

45 lines
1.2 KiB
Go

// Package healthcheck checks for missing binaries that the user needs to
// install.
package healthcheck
import (
"fmt"
"github.com/goreleaser/goreleaser/v2/internal/pipe/chocolatey"
"github.com/goreleaser/goreleaser/v2/internal/pipe/docker"
"github.com/goreleaser/goreleaser/v2/internal/pipe/nix"
"github.com/goreleaser/goreleaser/v2/internal/pipe/sbom"
"github.com/goreleaser/goreleaser/v2/internal/pipe/sign"
"github.com/goreleaser/goreleaser/v2/internal/pipe/snapcraft"
"github.com/goreleaser/goreleaser/v2/pkg/context"
)
// Healthchecker should be implemented by pipes that want checks.
type Healthchecker interface {
fmt.Stringer
// Dependencies return the binaries of the dependencies needed.
Dependencies(ctx *context.Context) []string
}
// Healthcheckers is the list of healthchekers.
//
//nolint:gochecknoglobals
var Healthcheckers = []Healthchecker{
system{},
snapcraft.Pipe{},
sign.Pipe{},
sign.BinaryPipe{},
sign.DockerPipe{},
sbom.Pipe{},
docker.Pipe{},
docker.ManifestPipe{},
chocolatey.Pipe{},
nix.NewPublish(),
}
type system struct{}
func (system) String() string { return "system" }
func (system) Dependencies(_ *context.Context) []string { return []string{"git", "go"} }