From 6959c1bc9b77a3b71ab56131ac84425327a483e3 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 22 May 2019 14:10:31 -0400 Subject: [PATCH] Makefile: Add kubeubilder and kustomize checks. Generating manifests and running the test suite require kustomize and kubebuilder. Add a quick check for them to the Makefile to avoid less obvious errors later if they are missing. Closes issue #14. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e5574ecff..0dfa7069b 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,12 @@ build: all: test manager # Run tests -test: generate fmt vet unit +test: testprereqs generate fmt vet unit + +.PHONY: testprereqs +testprereqs: + @if [ ! -d /usr/local/kubebuilder ] ; then echo "kubebuilder not found. See docs/dev/setup.md" && exit 1 ; fi + @if ! which kustomize >/dev/null 2>&1 ; then echo "kustomize not found. See docs/dev/setup.md" && exit 1 ; fi unit: manifests go test ./pkg/... ./cmd/... -coverprofile cover.out