Skip to content

Commit

Permalink
Set minimum Go version via env var
Browse files Browse the repository at this point in the history
GOTOOLCHAIN to set 1.21.0 as the min required version and sets it in go.work file.

Signed-off-by: Brendan Shephard <bshephar@redhat.com>
  • Loading branch information
bshephar committed Sep 18, 2024
1 parent b069b29 commit f255d08
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f255d08

Please sign in to comment.