Use GO_VERSION_MIN in Makefile check
This commit is contained in:
parent
e88a7f7088
commit
a406df64cf
6
Makefile
6
Makefile
@ -8,9 +8,11 @@ unexport GOFLAGS
|
||||
GOCC?=go
|
||||
|
||||
GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
|
||||
ifeq ($(shell expr $(GOVERSION) \< 1018001), 1)
|
||||
GOVERSIONMIN:=$(shell cat GO_VERSION_MIN | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
|
||||
|
||||
ifeq ($(shell expr $(GOVERSION) \< $(GOVERSIONMIN)), 1)
|
||||
$(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000))
|
||||
$(error Update Golang to version to at least 1.18.1)
|
||||
$(error Update Golang to version to at least $(shell cat GO_VERSION_MIN))
|
||||
endif
|
||||
|
||||
# git modules that need to be loaded
|
||||
|
Loading…
Reference in New Issue
Block a user