diff --git a/internal/pipe/krew/krew.go b/internal/pipe/krew/krew.go index 351a61b93..4bb5563c2 100644 --- a/internal/pipe/krew/krew.go +++ b/internal/pipe/krew/krew.go @@ -77,7 +77,7 @@ func runAll(ctx *context.Context, cli client.Client) error { return nil } -func doRun(ctx *context.Context, krew config.Krew, cl client.Client) error { +func doRun(ctx *context.Context, krew config.Krew, cl client.ReleaserURLTemplater) error { if krew.Name == "" { return pipe.Skip("krew: manifest name is not set") } @@ -177,7 +177,12 @@ func templateFields(ctx *context.Context, krew config.Krew) (config.Krew, error) return krew, nil } -func buildmanifest(ctx *context.Context, krew config.Krew, client client.Client, artifacts []*artifact.Artifact) (string, error) { +func buildmanifest( + ctx *context.Context, + krew config.Krew, + client client.ReleaserURLTemplater, + artifacts []*artifact.Artifact, +) (string, error) { data, err := manifestFor(ctx, krew, client, artifacts) if err != nil { return "", err @@ -193,7 +198,12 @@ func doBuildManifest(data Manifest) (string, error) { return string(out), nil } -func manifestFor(ctx *context.Context, cfg config.Krew, cl client.Client, artifacts []*artifact.Artifact) (Manifest, error) { +func manifestFor( + ctx *context.Context, + cfg config.Krew, + cl client.ReleaserURLTemplater, + artifacts []*artifact.Artifact, +) (Manifest, error) { result := Manifest{ APIVersion: apiVersion, Kind: kind, diff --git a/internal/pipe/scoop/scoop.go b/internal/pipe/scoop/scoop.go index dd506e3ca..8747cded6 100644 --- a/internal/pipe/scoop/scoop.go +++ b/internal/pipe/scoop/scoop.go @@ -71,7 +71,7 @@ func (Pipe) Default(ctx *context.Context) error { return nil } -func doRun(ctx *context.Context, cl client.Client) error { +func doRun(ctx *context.Context, cl client.ReleaserURLTemplater) error { scoop := ctx.Config.Scoop archives := ctx.Artifacts.Filter( @@ -231,7 +231,7 @@ func doBuildManifest(manifest Manifest) (bytes.Buffer, error) { return result, err } -func dataFor(ctx *context.Context, cl client.Client, artifacts []*artifact.Artifact) (Manifest, error) { +func dataFor(ctx *context.Context, cl client.ReleaserURLTemplater, artifacts []*artifact.Artifact) (Manifest, error) { manifest := Manifest{ Version: ctx.Version, Architecture: map[string]Resource{}, @@ -259,10 +259,10 @@ func dataFor(ctx *context.Context, cl client.Client, artifacts []*artifact.Artif } var arch string - switch { - case artifact.Goarch == "386": + switch artifact.Goarch { + case "386": arch = "32bit" - case artifact.Goarch == "amd64": + case "amd64": arch = "64bit" default: continue