-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (31 loc) · 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
# Makefile contributing guidelines: KEEP IT SIMPLE STUPID
linter := $(GOPATH)/bin/gometalinter.v2
$(linter):
go get gopkg.in/alecthomas/gometalinter.v2
gometalinter.v2 --install
SRC_FILES := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
guru := $(GOPATH)/bin/guru
$(guru):
go get golang.org/x/tools/cmd/guru
gogetdoc := $(GOPATH)/bin/gogetdoc
$(gogetdoc):
go get github.com/zmb3/gogetdoc
gocode := $(GOPATH)/bin/gocode
$(gocode):
go get github.com/stamblerre/gocode
# tools are all external commands used by gomate
tools: $(guru) $(linter) $(gogetdoc) $(gocode)
# assets folder contents are bundles with go executable
cmd/gomate/assets.go: assets/*
go get github.com/pokstad/go-bindata/...
go-bindata -o cmd/gomate/assets.go assets
$(GOPATH)/bin/gomate: cmd/gomate/assets.go
go install ./cmd/gomate
install: $(GOPATH)/bin/gomate tools
update: cmd/gomate/assets.go README.md
.PHONY: lint
lint: $(linter)
$(linter) --config .gometalinter.json ./...
.PHONY: test
test: tools
go test -race ./...