-
Notifications
You must be signed in to change notification settings - Fork 56
/
Makefile
27 lines (19 loc) · 677 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
.PHONY: all build clean vet test docgen
all: clean test build ## Run everything
BINDIR := ./bin
BINNAME := witness
BUILDFLAGS := -trimpath
clean: ## Clean the binary directory
rm -rf $(BINDIR)
build:
CGO_ENABLED=0 go build $(BUILDFLAGS) -o $(BINDIR)/$(BINNAME) ./main.go
vet: ## Run go vet
go vet ./...
test: ## Run go tests
go test -v -coverprofile=profile.cov -covermode=atomic ./...
coverage: ## Show the coverage
go tool cover -html=profile.cov
docgen: ## Generate the docs
go run ./docgen
help: ## Display this help screen
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'