From e9664a997e0271df92f4ff20b44074b980da8631 Mon Sep 17 00:00:00 2001 From: zgfzgf <1901989065@qq.com> Date: Thu, 19 Nov 2020 10:11:35 +0800 Subject: [PATCH] add go main version --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9c77aa8ee..ef6158376 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