mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-19 20:57:53 +02:00
fix(nix): hc should report nix-prefetch-url as a dependency
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
94981fb8c0
commit
c6851f5eee
@ -55,7 +55,8 @@ type Pipe struct {
|
||||
prefetcher shaPrefetcher
|
||||
}
|
||||
|
||||
func (Pipe) String() string { return "nixpkgs" }
|
||||
func (Pipe) String() string { return "nixpkgs" }
|
||||
func (Pipe) Dependencies(_ *context.Context) []string { return []string{"nix-prefetch-url"} }
|
||||
func (p Pipe) Skip(ctx *context.Context) bool {
|
||||
return len(ctx.Config.Nix) == 0 || !p.prefetcher.Available()
|
||||
}
|
||||
|
@ -414,6 +414,10 @@ func TestErrNoArchivesFound(t *testing.T) {
|
||||
}, "no archives found matching goos=[darwin linux] goarch=[amd64 arm arm64 386] goarm=[6 7] goamd64=v1 ids=[foo bar]")
|
||||
}
|
||||
|
||||
func TestDependencies(t *testing.T) {
|
||||
require.Equal(t, []string{"nix-prefetch-url"}, Pipe{}.Dependencies(nil))
|
||||
}
|
||||
|
||||
type fakeNixShaPrefetcher map[string]string
|
||||
|
||||
func (m fakeNixShaPrefetcher) Prefetch(url string) (string, error) {
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/goreleaser/goreleaser/internal/pipe/chocolatey"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe/docker"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe/nix"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe/sbom"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe/sign"
|
||||
"github.com/goreleaser/goreleaser/internal/pipe/snapcraft"
|
||||
@ -32,6 +33,7 @@ var Healthcheckers = []Healthchecker{
|
||||
docker.Pipe{},
|
||||
docker.ManifestPipe{},
|
||||
chocolatey.Pipe{},
|
||||
nix.NewPublish(),
|
||||
}
|
||||
|
||||
type system struct{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user