Skip to content

Commit

Permalink
fix: cleanup for Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
TrayserCassa committed Oct 11, 2024
1 parent a9a463b commit 95f3a23
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 95f3a23

Please sign in to comment.