-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
21 lines (17 loc) · 908 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.DEFAULT_GOAL := help
.PHONY: test
test: ## Test
@go test ./... -race -bench . -benchmem -trimpath -cover
.PHONY: lint
lint: ## Lint
@go get golang.org/x/tools/cmd/goimports@5916a50
@go get github.com/instrumenta/kubeval@0.14.0
@for d in $(shell go list -f {{.Dir}} ./...); do $(shell go env GOPATH)/bin/goimports -w $$d/*.go; done
@docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:v1.21.0 golangci-lint run --fix
@$(shell go env GOPATH)/bin/kubeval --strict --ignore-missing-schemas manifests/cluster_role.yaml manifests/cluster_role_binding.yaml manifests/pod_disruption_budget.yaml manifests/service.yaml manifests/service_account.yaml manifests/stateful_set.yaml
.PHONY: dev
dev: ## Run skaffold
@skaffold dev
.PHONY: help
help: ## Show help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'