File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ include $(ROOT_DIR_RELATIVE)/common.mk
2121
2222# Go
2323GO_VERSION ?=1.24.7
24+ GO_DIRECTIVE_VERSION ?= 1.24.0
2425GO_CONTAINER_IMAGE ?= golang:$(GO_VERSION )
2526
2627# Directories.
@@ -329,7 +330,7 @@ modules: ## Runs go mod to ensure proper vendoring.
329330 cd $(TOOLS_DIR ) ; go mod tidy
330331
331332.PHONY : verify # # Verify ties together the rest of the verification targets into one target
332- verify : verify-boilerplate verify-modules verify-gen verify-conversions verify-shellcheck verify-book-links release-manifests
333+ verify : verify-boilerplate verify-modules verify-gen verify-conversions verify-shellcheck verify-book-links release-manifests verify-go-directive
333334
334335.PHONY : verify-boilerplate
335336verify-boilerplate : # # Verify boilerplate
@@ -367,6 +368,12 @@ verify-gen: generate ## Verify generated files
367368verify-container-images : # # Verify container images
368369 TRACE=$(TRACE ) ./hack/verify-container-images.sh
369370
371+ .PHONY : verify-go-directive
372+ verify-go-directive :
373+ # use the core Cluster API script directly to verify the go directive matches the desired one.
374+ # ref: https://github.com/kubernetes-sigs/cluster-api/blob/v1.10.7/hack/verify-go-directive.sh
375+ curl --retry 3 -fsL https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/refs/tags/v1.10.7/hack/verify-go-directive.sh | bash -s -- -g $(GO_DIRECTIVE_VERSION )
376+
370377.PHONY : apidiff
371378apidiff : APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/main)
372379apidiff : $(GO_APIDIFF ) # # Check for API differences
You can’t perform that action at this time.
0 commit comments