From ab43e2accb07cb2299a16a5961e19d26d3480bb9 Mon Sep 17 00:00:00 2001 From: Marco Vedovati Date: Fri, 16 Nov 2018 17:32:22 +0100 Subject: [PATCH 1/2] make: add ability to skip go version check Add the ability to skip checking the go version, by passing to make the variable SKIP_GO_VERSION_CHECK=1 Fixes: #916 Signed-off-by: Marco Vedovati --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 57969f7c4f..35bb58c028 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,14 @@ done) GOARCH=$(shell go env GOARCH) HOST_ARCH=$(shell arch) +SKIP_GO_VERSION_CHECK= -include golang.mk +ifeq ($(SKIP_GO_VERSION_CHECK),) + include golang.mk +endif ifeq ($(ARCH),) - ARCH = $(GOARCH) + ARCH = $(GOARCH) endif ARCH_DIR = arch From 58c1db54a8780b596f0de877df4b18c298c77a6d Mon Sep 17 00:00:00 2001 From: Marco Vedovati Date: Fri, 16 Nov 2018 17:40:50 +0100 Subject: [PATCH 2/2] make: notify user if yq is going to be installed Notify about yq installation, and make the output of curl silent. Signed-off-by: Marco Vedovati --- .ci/install-yq.sh | 2 +- golang.mk | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/install-yq.sh b/.ci/install-yq.sh index 12b7998bba..b29cc5de2c 100755 --- a/.ci/install-yq.sh +++ b/.ci/install-yq.sh @@ -59,7 +59,7 @@ function install_yq() { yq_version=$(basename "${yq_latest_url}") local yq_url="https://${yq_pkg}/releases/download/${yq_version}/yq_${goos}_${goarch}" - curl -o "${yq_path}" -L ${yq_url} + curl -o "${yq_path}" -LSs ${yq_url} chmod +x ${yq_path} if ! command -v "${yq_path}" >/dev/null; then diff --git a/golang.mk b/golang.mk index 4f47462c2b..ce70efa786 100644 --- a/golang.mk +++ b/golang.mk @@ -8,6 +8,7 @@ have_yq=$(shell if [ -x "$(GOPATH)/bin/yq" ]; then echo "true"; else echo ""; fi) ifeq (,$(have_yq)) + $(info INFO: yq was not found, installing it) install_yq=$(shell .ci/install-yq.sh) endif ifneq (,$(install_yq))