-
Notifications
You must be signed in to change notification settings - Fork 79
/
Makefile
34 lines (22 loc) · 967 Bytes
/
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
30
31
32
33
34
all: help
-include lint.mk
-include rules.mk
build: cmd/smee/smee ## Compile smee for host OS and Architecture
crosscompile: $(crossbinaries) ## Compile smee for all architectures
gen: $(generated_go_files) ## Generate go generate'd files
IMAGE_TAG ?= smee:latest
image: cmd/smee/smee-linux-amd64 ## Build docker image
docker build -t $(IMAGE_TAG) .
test: gen ## Run go test
CGO_ENABLED=1 go test -race -coverprofile=coverage.txt -covermode=atomic -v ${TEST_ARGS} ./...
coverage: test ## Show test coverage
go tool cover -func=coverage.txt
vet: ## Run go vet
go vet ./...
goimports: gen ## Run goimports
$(GOIMPORTS) -w .
ci-checks: .github/workflows/ci-checks.sh gen
./.github/workflows/ci-checks.sh
ci: ci-checks coverage goimports lint vet ## Runs all the same validations and tests that run in CI
help: ## Print this help
@grep --no-filename -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sed 's/:.*##/·/' | sort | column -ts '·' -c 120