Add makefile

This commit is contained in:
Nikolai Rodionov 2023-12-24 18:37:46 +01:00
parent fc2c20901f
commit 502013bb5b
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD

13
Makefile Normal file
View File

@ -0,0 +1,13 @@
ENVTEST_K8S_VERSION = 1.28.0
# ---------------------------------------------------------------------
# -- A path to store binaries that are used in the Makefile
# ---------------------------------------------------------------------
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)
.PHONY: envtest
envtest: ## Download envtest-setup locally if necessary.
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
${LOCALBIN}/setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path