1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Makefile: define go binary in a make variable

Makes testing with different go versions easier.
This commit is contained in:
Markus Lehtonen 2019-12-16 15:37:53 +02:00
parent ee6fd9165b
commit fec55ec335

View file

@ -1,6 +1,8 @@
.PHONY: all test yamls
.FORCE:
GO_CMD := go
IMAGE_BUILD_CMD := docker build
IMAGE_BUILD_EXTRA_OPTS :=
IMAGE_PUSH_CMD := docker push
@ -42,10 +44,10 @@ mock:
mockery --name=LabelerClient --dir=pkg/labeler --inpkg --note="Re-generate by running 'make mock'"
test:
go test ./cmd/... ./pkg/...
$(GO_CMD) test ./cmd/... ./pkg/...
e2e-test:
go test -v ./test/e2e/ -args -nfd.repo=$(IMAGE_REPO) -nfd.tag=$(IMAGE_TAG_NAME) -kubeconfig=$(KUBECONFIG)
$(GO_CMD) test -v ./test/e2e/ -args -nfd.repo=$(IMAGE_REPO) -nfd.tag=$(IMAGE_TAG_NAME) -kubeconfig=$(KUBECONFIG)
push:
$(IMAGE_PUSH_CMD) $(IMAGE_TAG)