Add Golang version check

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-10-22 15:07:15 +02:00
parent 855b1fdd6e
commit df5862ba0e
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -1,6 +1,11 @@
all: build all: build
.PHONY: all .PHONY: all
GOVERSION:=$(shell go version | cut -d' ' -f 3 | cut -d. -f 2)
ifeq ($(shell expr $(GOVERSION) \< 13), 1)
$(warning Your Golang version is go 1.$(GOVERSION))
$(error Update Golang to version $(shell grep '^go' go.mod))
endif
# git modules that need to be loaded # git modules that need to be loaded
MODULES:= MODULES:=