Skip to content

Commit

Permalink
Makefile: Add kubeubilder and kustomize checks.
Browse files Browse the repository at this point in the history
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 metal3-io#14.
  • Loading branch information
russellb committed May 22, 2019
1 parent 551b940 commit 6959c1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6959c1b

Please sign in to comment.