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 <[email protected]>
  • Loading branch information
bshephar committed Sep 25, 2024
1 parent 3c6e318 commit 883cd17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ DEFAULT_IMG ?= quay.io/openstack-k8s-operators/swift-operator:latest
IMG ?= $(DEFAULT_IMG)
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.29.0

# Set minimum Go version
GOTOOLCHAIN_VERSION ?= go1.21.0

GINKGO ?= $(LOCALBIN)/ginkgo

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
Expand Down Expand Up @@ -331,7 +335,7 @@ golint: get-ci-tools

.PHONY: gowork
gowork: ## Generate go.work file to support our multi module repository
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 883cd17

Please sign in to comment.