this repo has no description
1
2SHELL = /bin/bash
3.SHELLFLAGS = -o pipefail -c
4
5.PHONY: help
6help: ## Print info about all commands
7 @echo "Commands:"
8 @echo
9 @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[01;32m%-20s\033[0m %s\n", $$1, $$2}'
10
11.PHONY: build
12build: ## Build all executables
13 go build .
14
15.PHONY: all
16all: build
17
18.PHONY: test
19test: ## Run tests
20 go test ./...
21
22.PHONY: coverage-html
23coverage-html: ## Generate test coverage report and open in browser
24 go test ./... -coverpkg=./... -coverprofile=test-coverage.out
25 go tool cover -html=test-coverage.out
26
27.PHONY: lint
28lint: ## Verify code style and run static checks
29 go vet ./...
30 test -z $(gofmt -l ./...)
31
32.PHONY: golangci-lint
33golangci-lint: ## Additional static linting
34 golangci-lint run
35
36.PHONY: fmt
37fmt: ## Run syntax re-formatting (modify in place)
38 go fmt ./...
39
40.PHONY: check
41check: ## Compile everything, checking syntax (does not output binaries)
42 go build ./...
43
44.env:
45 if [ ! -f ".env" ]; then cp example.dev.env .env; fi