diff --git a/Makefile b/Makefile index 9c77aa8eee5..ef61583762b 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,9 @@ all: build unexport GOFLAGS -GOVERSION:=$(shell go version | cut -d' ' -f 3 | awk -F. '{printf "%d%03d", $$2, $$3}') -ifeq ($(shell expr $(GOVERSION) \< 15005), 1) -$(warning Your Golang version is go 1.$(shell expr $(GOVERSION) / 1000).$(shell expr $(GOVERSION) % 1000)) +GOVERSION:=$(shell go version | cut -d' ' -f 3 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}') +ifeq ($(shell expr $(GOVERSION) \< 1015005), 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.15.5) endif