diff --git a/Makefile b/Makefile index bd6cd76..9b8641c 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,9 @@ IMG ?= $(DEFAULT_IMG) # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.29 +# Set minimum Go version +GOTOOLCHAIN_VERSION ?= go1.21.0 + # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -339,7 +342,7 @@ golint: get-ci-tools .PHONY: gowork gowork: ## Generate go.work file - test -f go.work || go work init + test -f go.work || GOTOOLCHAIN=$(GOTOOLCHAIN_VERSION) go work init go work use . go work use ./api go work sync