From df5862ba0ee80bb9d8f68ee7c7c65003c29bf234 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Tue, 22 Oct 2019 15:07:15 +0200 Subject: [PATCH] Add Golang version check License: MIT Signed-off-by: Jakub Sztandera --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index cb550bf57..6c3a6049f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ all: build .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 MODULES:=