Skip to content

Commit

Permalink
Fix controller-gen makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini committed Sep 26, 2024
1 parent eba9d31 commit 7a79855
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
@echo "⬇️ Ensuring controller-gen is installed..."
@test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) > /dev/null 2>&1
@test -s $(CONTROLLER_GEN) || (GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) > /dev/null 2>&1 && echo "✅ controller-gen installed successfully!")

$(CONTROLLER_GEN):
@mkdir -p $(LOCALBIN) # Ensure LOCALBIN exists

.PHONY: envtest
envtest: $(ENVTEST) ## Download setup-envtest locally if necessary.
Expand Down

0 comments on commit 7a79855

Please sign in to comment.