From 95f3a233c11335a4853146240edb620afc13eb59 Mon Sep 17 00:00:00 2001 From: Patrick Derks Date: Fri, 11 Oct 2024 17:05:26 +0200 Subject: [PATCH] fix: cleanup for Makefile --- Makefile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index bddeabb..d1a6a15 100644 --- a/Makefile +++ b/Makefile @@ -80,16 +80,8 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." -.PHONY: fmt -fmt: ## Run go fmt against code. - go fmt ./... - -.PHONY: vet -vet: ## Run go vet against code. - go vet ./... - .PHONY: test -test: manifests generate fmt vet envtest ## Run tests. +test: manifests generate envtest ## Run tests. KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint @@ -111,11 +103,11 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes ##@ Build .PHONY: build -build: manifests generate fmt vet ## Build manager binary. +build: manifests generate ## Build manager binary. go build -o bin/manager cmd/manager.go .PHONY: run -run: manifests generate fmt vet zap-pretty ## Run a controller from your host. +run: manifests generate zap-pretty ## Run a controller from your host. go run ./cmd/manager.go --namespace ${NAMESPACE} --disable-checks --debug 2>&1 | $(ZAP_PRETTY) --all # If you wish to build the manager image targeting other platforms you can use the --platform flag. @@ -154,7 +146,7 @@ endif .PHONY: install install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build config/crd | $(KUBECTL) apply -f - + $(KUSTOMIZE) build config/crd | $(KUBECTL) apply --namespace ${NAMESPACE} -f - .PHONY: uninstall uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.