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