diff --git a/klone.yaml b/klone.yaml index 8c487399..78e34cc0 100644 --- a/klone.yaml +++ b/klone.yaml @@ -10,47 +10,47 @@ targets: - folder_name: boilerplate repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/boilerplate - folder_name: cert-manager repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/cert-manager - folder_name: controller-gen repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/controller-gen - folder_name: generate-verify repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/generate-verify - folder_name: helm repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/helm - folder_name: help repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/help - folder_name: kind repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/kind - folder_name: klone repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/klone - folder_name: oci-image repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/oci-image - folder_name: repository-base repo_url: https://github.com/cert-manager/makefile-modules.git @@ -60,5 +60,5 @@ targets: - folder_name: tools repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 9f0a38db1bbd0ac468c2b12d6f61251b2f4452d9 + repo_hash: dc8ce162c76ca7b95f80157aefa4afb9d2783b82 repo_path: modules/tools diff --git a/make/_shared/controller-gen/01_mod.mk b/make/_shared/controller-gen/01_mod.mk index 2387c444..7dedf6b7 100644 --- a/make/_shared/controller-gen/01_mod.mk +++ b/make/_shared/controller-gen/01_mod.mk @@ -16,8 +16,6 @@ # Check Inputs # ################ -shared_generate_targets ?= # empty - ifndef go_header_file $(error go_header_file is not set) endif diff --git a/make/_shared/generate-verify/01_mod.mk b/make/_shared/generate-verify/00_mod.mk similarity index 79% rename from make/_shared/generate-verify/01_mod.mk rename to make/_shared/generate-verify/00_mod.mk index f0f10e07..c755a3d4 100644 --- a/make/_shared/generate-verify/01_mod.mk +++ b/make/_shared/generate-verify/00_mod.mk @@ -12,6 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Shared targets are set by other Makefile modules. +shared_generate_targets ?= +shared_verify_targets_dirty ?= + +# Extra targets are set by the Makefiles in the project. extra_generate_targets ?= extra_verify_targets ?= extra_verify_targets_dirty ?= diff --git a/make/_shared/helm/crds.mk b/make/_shared/helm/crds.mk index c27a8520..c8f36f5e 100644 --- a/make/_shared/helm/crds.mk +++ b/make/_shared/helm/crds.mk @@ -16,8 +16,6 @@ # Check Inputs # ################ -shared_generate_targets ?= # empty - ifndef helm_chart_source_dir $(error helm_chart_source_dir is not set) endif diff --git a/make/_shared/helm/helm.mk b/make/_shared/helm/helm.mk index d512ffca..3fbf974d 100644 --- a/make/_shared/helm/helm.mk +++ b/make/_shared/helm/helm.mk @@ -53,6 +53,9 @@ $(helm_chart_archive): $(helm_chart_sources) | $(NEEDS_HELM) $(NEEDS_YQ) $(bin_d echo "Chart name does not match the name in the helm_chart_name variable"; \ exit 1; \ fi + + $(YQ) '.annotations."artifacthub.io/prerelease" = "$(IS_PRERELEASE)"' \ + --inplace $(helm_chart_source_dir_versioned)/Chart.yaml mkdir -p $(dir $@) $(HELM) package $(helm_chart_source_dir_versioned) \ diff --git a/make/_shared/help/help.sh b/make/_shared/help/help.sh index 83d91bd0..391c39f3 100755 --- a/make/_shared/help/help.sh +++ b/make/_shared/help/help.sh @@ -21,10 +21,10 @@ CATEGORY_COLOR="$(tput setaf 3)" CLEAR_STYLE="$(tput sgr0)" PURPLE=$(tput setaf 125) -EMPTYLINE_REGEX="^\s*$" -DOCBLOCK_REGEX="^##\s*(.*)$" -CATEGORY_REGEX="^##\s*@category\s*(.*)$" -TARGET_REGEX="^([a-zA-Z0-9\_\/\%\$\-\(\)]+):.*$" +EMPTYLINE_REGEX="^[[:space:]]*$" +DOCBLOCK_REGEX="^##[[:space:]]*(.*)$" +CATEGORY_REGEX="^##[[:space:]]*@category[[:space:]]*(.*)$" +TARGET_REGEX="^(([a-zA-Z0-9\_\/\%\$\(\)]|-)+):.*$" EMPTY_ITEM="" diff --git a/make/_shared/tools/00_mod.mk b/make/_shared/tools/00_mod.mk index 39c9ea78..7651bac9 100644 --- a/make/_shared/tools/00_mod.mk +++ b/make/_shared/tools/00_mod.mk @@ -90,6 +90,10 @@ TOOLS += oras=v1.1.0 TOOLS += ginkgo=$(shell [[ -f go.mod ]] && awk '/ginkgo\/v2/ {print $$2}' go.mod || echo "v2.13.2") # https://pkg.go.dev/github.com/cert-manager/klone?tab=versions TOOLS += klone=v0.0.3 +# https://pkg.go.dev/github.com/goreleaser/goreleaser?tab=versions +TOOLS += goreleaser=v1.23.0 +# https://pkg.go.dev/github.com/anchore/syft/cmd/syft?tab=versions +TOOLS += syft=v0.100.0 # https://pkg.go.dev/k8s.io/code-generator/cmd?tab=versions K8S_CODEGEN_VERSION=v0.29.0 @@ -100,7 +104,7 @@ TOOLS += etcd=$(KUBEBUILDER_ASSETS_VERSION) TOOLS += kube-apiserver=$(KUBEBUILDER_ASSETS_VERSION) # https://go.dev/dl/ -VENDORED_GO_VERSION := 1.21.5 +VENDORED_GO_VERSION := 1.21.6 # Print the go version which can be used in GH actions .PHONY: print-go-version @@ -262,6 +266,8 @@ GO_DEPENDENCIES += boilersuite=github.com/cert-manager/boilersuite GO_DEPENDENCIES += gomarkdoc=github.com/princjef/gomarkdoc/cmd/gomarkdoc GO_DEPENDENCIES += oras=oras.land/oras/cmd/oras GO_DEPENDENCIES += klone=github.com/cert-manager/klone +GO_DEPENDENCIES += goreleaser=github.com/goreleaser/goreleaser +GO_DEPENDENCIES += syft=github.com/anchore/syft/cmd/syft define go_dependency $$(bin_dir)/downloaded/tools/$1@$($(call UC,$1)_VERSION)_%: | $$(NEEDS_GO) $$(bin_dir)/downloaded/tools