-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
44 lines (30 loc) · 873 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.PHONY: test release
SHELL = /bin/bash -o pipefail
BUMP_VERSION := $(GOPATH)/bin/bump_version
STATICCHECK := $(GOPATH)/bin/staticcheck
RELEASE := $(GOPATH)/bin/github-release
WRITE_MAILMAP := $(GOPATH)/bin/write_mailmap
UNAME := $(shell uname)
test:
go test ./...
$(STATICCHECK):
go get honnef.co/go/tools/cmd/staticcheck
$(BUMP_VERSION):
go get -u github.com/kevinburke/bump_version
$(RELEASE):
go get -u github.com/aktau/github-release
$(WRITE_MAILMAP):
go get -u github.com/kevinburke/write_mailmap
force: ;
AUTHORS.txt: force | $(WRITE_MAILMAP)
$(WRITE_MAILMAP) > AUTHORS.txt
authors: AUTHORS.txt
lint: | $(STATICCHECK)
$(STATICCHECK) ./...
go vet ./...
race-test: lint
go test -race ./...
# Run "GITHUB_TOKEN=my-token make release version=0.x.y" to release a new version.
release: race-test
$(BUMP_VERSION) minor cmd.go
git push origin --tags