-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (28 loc) · 905 Bytes
/
Makefile
File metadata and controls
40 lines (28 loc) · 905 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
34
35
36
37
38
39
40
SHELL = /bin/bash -o pipefail
BENCHSTAT := $(GOPATH)/bin/benchstat
BUMP_VERSION := $(GOPATH)/bin/bump_version
GODOCDOC := $(GOPATH)/bin/godocdoc
STATICCHECK := $(GOPATH)/bin/staticcheck
test: vet
@# this target should always be listed first so "make" runs the tests.
go test -trimpath ./...
$(STATICCHECK):
GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@latest
check: $(STATICCHECK)
$(STATICCHECK) ./...
race-test:
go test -trimpath -race ./...
vet:
go vet -trimpath ./...
$(GODOCDOC):
go get github.com/kevinburke/godocdoc
docs: $(GODOCDOC)
$(GODOCDOC)
$(BENCHSTAT):
go get golang.org/x/perf/cmd/benchstat
bench: $(BENCHSTAT)
go test -trimpath -count=3 -benchtime=2s -bench=. -run='^$$' ./... | $(BENCHSTAT) /dev/stdin
$(BUMP_VERSION):
go get github.com/kevinburke/bump_version
release: check race-test | $(BUMP_VERSION)
$(BUMP_VERSION) --tag-prefix=v minor nacl.go