From 0fd259aa7f6475fa58811d2cf4aaa7b45810e432 Mon Sep 17 00:00:00 2001 From: Paolo Patierno Date: Sun, 2 Feb 2020 15:48:56 +0100 Subject: [PATCH] Add a checkenv target Add checking GOROOT on the checkenv target --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b9761e7b10a..c8f3b4b973f 100644 --- a/Makefile +++ b/Makefile @@ -55,8 +55,15 @@ publish: build ################################################## GO_BUILD_VARS= GO111MODULE=on CGO_ENABLED=$(CGO) GOOS=$(TARGET_OS) GOARCH=$(ARCH) +.PHONY: checkenv +checkenv: +ifndef GOROOT + @echo "GOROOT is not defined" + @exit 1 +endif + .PHONY: build -build: build-adapter build-controller +build: checkenv build-adapter build-controller .PHONY: build-controller build-controller: generate-api pkg/scalers/liiklus/LiiklusService.pb.go