Check for minimum golang version

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
Marcos Lilljedahl 2016-03-16 17:12:34 -03:00
parent d5742209d3
commit c6680da78b
2 changed files with 10 additions and 3 deletions

View file

@ -12,8 +12,15 @@ DOCKER_IMAGE := containerd-dev$(if $(GIT_BRANCH),:$(GIT_BRANCH))
DOCKER_RUN := docker run --rm -i $(DOCKER_FLAGS) "$(DOCKER_IMAGE)"
export GO15VENDOREXPERIMENT:=1
GOLANG_VERSION:=$(shell go version | cut -d ' ' -f3 | cut -c 3-)
all: client daemon shim
all: check_version client daemon shim
check_version:
ifneq ($(shell /bin/echo -e "1.5\n${GOLANG_VERSION}" | sort -V | head -n1),1.5)
$(error "Golang 1.5+ required to build containerd. Current version: ${GOLANG_VERSION}")
endif
bin:
mkdir -p bin/