-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
31 lines (26 loc) · 915 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
# ------------------------------------------------------
# VARIABLES
# ------------------------------------------------------
SHELL := /bin/bash -o pipefail
# ------------------------------------------------------
# HELP
# ------------------------------------------------------
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
# ------------------------------------------------------
# MAIN COMMANDS
# ------------------------------------------------------
.PHONY: all
all: gen format test
.PHONY: gen
gen: ## Generate code
rm -f $$(find . -type f -name "*mock_test.go")
go generate ./...
go mod tidy -go=1.19 -compat=1.19
.PHONY: format
format: ## Format the source code
go run golang.org/x/tools/cmd/goimports -w .
.PHONY: test
test: ## Run tests
go test -count=1 -timeout 10m -v -cover -race ./...