From dafd9342e059beda74a7ca9d2cbee0f29dfef450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 21 Aug 2019 17:32:28 +0200 Subject: [PATCH] add DISABLE_GO_CHECKS flag --- makefiles/targets.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/makefiles/targets.mk b/makefiles/targets.mk index 27119ac..2072ffd 100644 --- a/makefiles/targets.mk +++ b/makefiles/targets.mk @@ -103,11 +103,14 @@ status: | $(REPOS) $(RUN_CMD_IN_ALL_REPOS) MIN_GO_VER := 1.12 +DISABLE_GO_CHECKS := 0 go-checks: +ifeq ($(DISABLE_GO_CHECKS), 0) which go &>/dev/null || { echo "Go compiler not installed. Aborting."; exit 1; } GO_VER="$$(go version | sed -E 's/^.*go([0-9.]+).*$$/\1/')"; \ [[ $$(echo -e "$${GO_VER}\n$(MIN_GO_VER)" | sort -t '.' -k 1,1 -k 2,2 -g | head -n 1) == "$(MIN_GO_VER)" ]] || \ { echo "Minimum Go compiler version required: $(MIN_GO_VER). Version available: $$GO_VER. Aborting."; exit 1; } +endif vendor/go/bin/p2pd: | go-checks echo -e $(BUILD_MSG) "$@" && \