From 4610b7cfbc33f6255203eb56714927068c8aebcf Mon Sep 17 00:00:00 2001 From: Mitchell Nielsen Date: Mon, 18 Nov 2024 14:51:09 -0600 Subject: [PATCH] Add make clean (#135) * Add Make target to clean up project directory Adds a Makefile target to clean up the project directory of any generated files. The first one added here is to clean up the kubebuilder binaries, which are write-protected and therefore cannot be removed with 'rm -rf'. Related to https://linear.app/prefect/issue/PLA-690/cycle-6-catch-all * Remove empty 'Dependencies' section --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index edc553c..34256b4 100644 --- a/Makefile +++ b/Makefile @@ -70,6 +70,11 @@ SHELL = /usr/bin/env bash -o pipefail help: ## Display this help. @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) +.PHONY: clean +clean: ## Clean up the project directory. + @$(ENVTEST) cleanup $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) + @rm -rf $(LOCALBIN) + ##@ Development .PHONY: manifests @@ -183,8 +188,6 @@ deploy: helmbuild ## Install CRDs & the Helm Chart to the K8s cluster specified undeploy: ## Uninstall the Helm Chart to the K8s cluster specified in ~/.kube/config. helm uninstall $(RELEASE_NAME) --namespace $(NAMESPACE) -##@ Dependencies - ## Location to install dependencies to LOCALBIN ?= $(shell pwd)/bin $(LOCALBIN):