-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
40 lines (30 loc) · 892 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
.PHONY: install build test
BUMP_VERSION := $(GOPATH)/bin/bump_version
GODOCDOC := $(GOPATH)/bin/godocdoc
MEGACHECK := $(GOPATH)/bin/megacheck
UNAME = $(shell uname -s)
install:
go get ./...
go install ./...
$(MEGACHECK):
ifeq ($(UNAME),Darwin)
curl --silent --location --output $(MEGACHECK) https://github.com/kevinburke/go-tools/releases/download/2018-01-25/megacheck-darwin-amd64
else
curl --silent --location --output $(MEGACHECK) https://github.com/kevinburke/go-tools/releases/download/2018-01-25/megacheck-linux-amd64
endif
chmod +x $(MEGACHECK)
lint: $(MEGACHECK)
$(MEGACHECK) ./...
go vet ./...
test: lint
go test ./...
race-test:
go test -race ./...
$(BUMP_VERSION):
go get -u github.com/Shyp/bump_version
release: race-test | $(BUMP_VERSION)
$(BUMP_VERSION) minor types.go
$(GODOCDOC):
go get -u github.com/kevinburke/godocdoc
docs: | $(GODOCDOC)
$(GODOCDOC)