From d89f5ebd465736e6971a21e47aa8f75658b2577d Mon Sep 17 00:00:00 2001 From: Breee Date: Wed, 13 Dec 2023 18:05:48 +0100 Subject: [PATCH] required go version dynamic Signed-off-by: Breee --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b7bbbe..0a03dac 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ NPROCS ?= 1 # to half the number of CPU cores. GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 ))) -GO_REQUIRED_VERSION ?= 1.19 +GO_REQUIRED_VERSION ?= $(shell $(GO) version | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p') GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION) GO_SUBDIRS += cmd internal apis