forked from kevinburke/twilio-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (39 loc) · 1.1 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
.PHONY: test vet release
# would be great to make the bash location portable but not sure how
SHELL = /bin/bash -o pipefail
DIFFER := $(GOPATH)/bin/differ
WRITE_MAILMAP := $(GOPATH)/bin/write_mailmap
BUMP_VERSION := $(GOPATH)/bin/bump_version
STATICCHECK := $(GOPATH)/bin/staticcheck
test: lint
go test ./...
$(BUMP_VERSION):
go get github.com/kevinburke/bump_version
$(DIFFER):
go get github.com/kevinburke/differ
$(STATICCHECK):
go get honnef.co/go/tools/cmd/staticcheck
$(WRITE_MAILMAP):
go get github.com/kevinburke/write_mailmap
lint: fmt | $(STATICCHECK)
go vet ./...
$(STATICCHECK) ./...
race-test: lint
go test -race ./...
race-test-short: lint
go test -short -race ./...
fmt:
go fmt ./...
ci: | $(DIFFER)
# would love to run differ make authors here, but Github doesn't check out
# the full history
$(DIFFER) $(MAKE) fmt
$(MAKE) lint race-test-short
release: race-test | $(DIFFER) $(BUMP_VERSION)
$(DIFFER) $(MAKE) authors
$(DIFFER) $(MAKE) fmt
$(BUMP_VERSION) minor http.go
force: ;
AUTHORS.txt: .mailmap force | $(WRITE_MAILMAP)
$(WRITE_MAILMAP) > AUTHORS.txt
authors: AUTHORS.txt