diff --git a/Makefile b/Makefile index c56537820..b87590b51 100644 --- a/Makefile +++ b/Makefile @@ -188,16 +188,18 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest KUSTOMIZE_VERSION ?= v5.5.0 CONTROLLER_TOOLS_VERSION ?= v0.16.4 +update-deps: + KUSTOMIZE_VERSION=$(KUSTOMIZE_VERSION) CONTROLLER_TOOLS_VERSION=$(CONTROLLER_TOOLS_VERSION) ./deps/update_e2e_deps.sh + .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. $(CONTROLLER_GEN): $(LOCALBIN) GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) -KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. $(KUSTOMIZE): $(LOCALBIN) - curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN) + GOBIN=$(LOCALBIN) go install sigs.k8s.io/kustomize/kustomize/v5@$(KUSTOMIZE_VERSION) .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. diff --git a/deps/update_e2e_deps.sh b/deps/update_e2e_deps.sh index 4a000b465..b3eebaac2 100755 --- a/deps/update_e2e_deps.sh +++ b/deps/update_e2e_deps.sh @@ -7,7 +7,7 @@ echo """ updating kustomize dependency --------------------------------------- """ -go get sigs.k8s.io/kustomize/kustomize/v5@v5.5.0 +go get "sigs.k8s.io/kustomize/kustomize/v5@$KUSTOMIZE_VERSION" cd ../controller-gen @@ -16,6 +16,6 @@ echo """ updating controller-gen dependency -------------------------------------- """ -go get sigs.k8s.io/controller-tools@v0.16.4 +go get "sigs.k8s.io/controller-tools@$CONTROLLER_TOOLS_VERSION" cd ../..