forked from kubernetes-sigs/karpenter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (23 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
export KUBEBUILDER_ASSETS ?= ${HOME}/.kubebuilder/bin
help: ## Display help
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\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)
presubmit: verify test ## Run all steps required for code to be checked in
test: ## Run tests
go test ./... \
-race \
--ginkgo.focus="${FOCUS}" \
-cover -coverprofile=coverage.out -outputdir=. -coverpkg=./...
verify: ## Verify code. Includes codegen, dependencies, linting, formatting, etc
go mod tidy
go generate ./...
hack/boilerplate.sh
go vet ./...
golangci-lint run
@git diff --quiet ||\
{ echo "New file modification detected in the Git working tree. Please check in before commit."; git --no-pager diff --name-only | uniq | awk '{print " - " $$0}'; \
if [ $(MAKECMDGOALS) = 'ci' ]; then\
exit 1;\
fi;}
toolchain: ## Install developer toolchain
./hack/toolchain.sh
.PHONY: help presubmit dev test verify toolchain