-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (25 loc) · 698 Bytes
/
Makefile
File metadata and controls
33 lines (25 loc) · 698 Bytes
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
APP=arbines
.PHONY: ready
ready: lint test build
all: ready
build:
go mod download
go mod tidy
go build -o bin/${APP} .
install: build
cp bin/${APP} ${GOPATH}/bin/${APP}
[[ -f $(shell which codesign) ]] && codesign -s - ${GOPATH}/bin/${APP}
.PHONY: lint
lint:
golangci-lint run --fix ./... --timeout=120s
.PHONY: test
test:
go test ./...
test-cover:
go install github.com/ory/go-acc@latest
go-acc -o coverage.out ./... -- -v
go tool cover -html=coverage.out -o coverage.html
open coverage.html
.PHONY: help
help: ## Display available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'