From 4dd0a4f358b21a454226e8da4959f81c2154a6e7 Mon Sep 17 00:00:00 2001 From: ccremer Date: Mon, 4 Jul 2022 13:31:17 +0200 Subject: [PATCH] Fix missing crds when releasing --- .goreleaser.yml | 2 +- Makefile | 4 ++++ charts/charts.mk | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index d289530..6a27ed8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,7 +2,7 @@ # Make sure to check the documentation at http://goreleaser.com before: hooks: - - make crds + - make release-prepare builds: - env: diff --git a/Makefile b/Makefile index f9b5a5b..1f100f6 100644 --- a/Makefile +++ b/Makefile @@ -95,3 +95,7 @@ run-operator: ## Run in Operator mode against your current kube context clean: kind-clean ## Cleans local build artifacts rm -rf docs/node_modules $(docs_out_dir) dist .cache package/*.xpkg $(DOCKER_CMD) rmi $(CONTAINER_IMG) || true + +.PHONY: release-prepare +release-prepare: generate-go ## Prepares artifacts for releases + @cat package/crds/*.yaml | yq > .github/crds.yaml diff --git a/charts/charts.mk b/charts/charts.mk index c392b6c..804fa97 100644 --- a/charts/charts.mk +++ b/charts/charts.mk @@ -9,8 +9,7 @@ $(helm_docs_bin): cd charts && go build -o $@ github.com/norwoodj/helm-docs/cmd/helm-docs .PHONY: chart-prepare -chart-prepare: generate-go ## Prepare the Helm charts - @cat package/crds/*.yaml | yq > .github/crds.yaml +chart-prepare: release-prepare ## Prepare the Helm charts @find charts -type f -name Makefile | sed 's|/[^/]*$$||' | xargs -I '%' make -C '%' clean prepare .PHONY: chart-docs