diff --git a/Makefile b/Makefile index f676904..e4b5314 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,8 @@ GOLANGCI_LINT_VERSION ?= v1.52.2 GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint VALIDATE_KREW_MAIFEST_VERSION ?= v0.4.3 VALIDATE_KREW_MAIFEST := $(TOOLS_BIN_DIR)/validate-krew-manifest +GORELEASER_FILTER_VERSION ?= v0.3.0 +GORELEASER_FILTER := $(TOOLS_BIN_DIR)/goreleaser-filter $(GORELEASER): GOBIN=$(TOOLS_BIN_DIR) go install github.com/goreleaser/goreleaser@$(GORELEASER_VERSION) @@ -22,6 +24,9 @@ $(GOLANGCI_LINT): $(VALIDATE_KREW_MAIFEST): GOBIN=$(TOOLS_BIN_DIR) go install sigs.k8s.io/krew/cmd/validate-krew-manifest@$(VALIDATE_KREW_MAIFEST_VERSION) +$(GORELEASER_FILTER): + GOBIN=$(TOOLS_BIN_DIR) go install github.com/t0yv0/goreleaser-filter@$(GORELEASER_FILTER_VERSION) + .PHONY: build-cross build-cross: $(GORELEASER) $(GORELEASER) build --snapshot --clean @@ -47,7 +52,11 @@ validate-krew-manifest: $(VALIDATE_KREW_MAIFEST) $(VALIDATE_KREW_MAIFEST) -manifest dist/view-serviceaccount-kubeconfig.yaml -skip-install .PHONY: dist -dist: $(GORELEASER) +dist: $(GORELEASER) $(GORELEASER_FILTER) + cat .goreleaser.yaml | $(GORELEASER_FILTER) -goos $(shell go env GOOS) -goarch $(shell go env GOARCH) | $(GORELEASER) release -f- --clean --skip-publish --snapshot + +.PHONY: dist-all +dist-all: $(GORELEASER) $(GORELEASER) release --clean --skip-publish --snapshot .PHONY: release