2023-03-03 09:50:15 -03:00
|
|
|
// Package healthcheck checks for missing binaries that the user needs to
|
|
|
|
// install.
|
|
|
|
package healthcheck
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/goreleaser/goreleaser/internal/pipe/chocolatey"
|
|
|
|
"github.com/goreleaser/goreleaser/internal/pipe/docker"
|
2023-06-17 23:23:14 +00:00
|
|
|
"github.com/goreleaser/goreleaser/internal/pipe/nix"
|
2023-03-03 09:50:15 -03:00
|
|
|
"github.com/goreleaser/goreleaser/internal/pipe/sbom"
|
|
|
|
"github.com/goreleaser/goreleaser/internal/pipe/sign"
|
|
|
|
"github.com/goreleaser/goreleaser/internal/pipe/snapcraft"
|
|
|
|
"github.com/goreleaser/goreleaser/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.DockerPipe{},
|
|
|
|
sbom.Pipe{},
|
|
|
|
docker.Pipe{},
|
|
|
|
docker.ManifestPipe{},
|
|
|
|
chocolatey.Pipe{},
|
2023-06-17 23:23:14 +00:00
|
|
|
nix.NewPublish(),
|
2023-03-03 09:50:15 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
type system struct{}
|
|
|
|
|
2023-03-19 22:17:18 -03:00
|
|
|
func (system) String() string { return "system" }
|
|
|
|
func (system) Dependencies(_ *context.Context) []string { return []string{"git", "go"} }
|