@@ -54,6 +54,9 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
5454generate : controller-gen # # Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
5555 $(CONTROLLER_GEN ) object:headerFile=" hack/boilerplate.go.txt" paths=" ./..."
5656
57+ .PHONY : check-gen
58+ check-gen : generate manifests docs helm fmt # # Run all code generation and formatting checks.
59+
5760.PHONY : fmt
5861fmt : goimports # # Run goimports against code.
5962 $(GOIMPORTS ) -w .
@@ -71,7 +74,10 @@ check-license: addlicense ## Check that every file has a license header present.
7174 find . -name ' *.go' -exec $(ADDLICENSE ) -check -c ' IronCore authors' {} +
7275
7376.PHONY : test
74- test : manifests generate fmt vet setup-envtest # # Run tests.
77+ test : manifests generate fmt vet test-only # # Run tests.
78+
79+ .PHONY : test-only
80+ test-only : setup-envtest # # Run tests without generating manifests or code.
7581 KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test $$(go list ./... | grep -v /e2e ) -coverprofile cover.out
7682
7783# TODO(user): To use a different vendor for e2e tests, modify the setup under 'tests/e2e'.
@@ -193,20 +199,19 @@ ADDLICENSE ?= $(LOCALBIN)/addlicense
193199GOIMPORTS ?= $(LOCALBIN ) /goimports
194200CRD_REF_DOCS ?= $(LOCALBIN ) /crd-ref-docs
195201KUBEBUILDER ?= $(LOCALBIN ) /kubebuilder
196- SETUP_ENVTEST_VERSION ?= v0.17.1 # example pre-0.22
197202
198203# # Tool Versions
199- KUSTOMIZE_VERSION ?= v5.5.0
200- CONTROLLER_TOOLS_VERSION ?= v0.17.1
204+ KUSTOMIZE_VERSION ?= v5.8.2
205+ CONTROLLER_TOOLS_VERSION ?= v0.23.0
201206# ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
202207ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-% d.% d", $$2, $$3}')
203208# ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
204209ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.% d.% d",$$3, $$2}')
205- GOLANGCI_LINT_VERSION ?= v2.6
206- ADDLICENSE_VERSION ?= v1.1.1
207- GOIMPORTS_VERSION ?= v0.31 .0
208- CRD_REF_DOCS_VERSION ?= v0.2 .0
209- KUBEBUILDER_VERSION ?= v4.5.1
210+ GOLANGCI_LINT_VERSION ?= v2.15
211+ ADDLICENSE_VERSION ?= v1.2.0
212+ GOIMPORTS_VERSION ?= v0.52 .0
213+ CRD_REF_DOCS_VERSION ?= v0.3 .0
214+ KUBEBUILDER_VERSION ?= v4.16.0
210215
211216.PHONY : kustomize
212217kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
0 commit comments