-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (51 loc) · 1.11 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
56
57
58
59
60
61
62
63
64
65
66
PROJ=insighted-go
ORG_PATH=github.com/insighted4
REPO_PATH=$(ORG_PATH)/$(PROJ)
all: test
deps:
go get -d -v $(REPO_PATH)/...
updatedeps:
go get -d -v -u -f $(REPO_PATH)/...
testdeps:
go get -d -v -t $(REPO_PATH)/...
updatetestdeps:
go get -d -v -t -u -f $(REPO_PATH)/...
build: deps
go build $(REPO_PATH)/...
install: deps
go install $(REPO_PATH)/...
lint: testdeps
go get -v github.com/golang/lint/golint
for file in $$(find . -name '*.go' | grep -v '\.pb\.go\|\.pb\.gw\.go\|examples\|pubsub\/aws\/awssub_test\.go' | grep -v 'server\/kit\/kitserver_pb_test\.go'); do \
golint $${file}; \
if [ -n "$$(golint $${file})" ]; then \
exit 1; \
fi; \
done
vet: testdeps
go vet $(REPO_PATH)/...
errcheck: testdeps
go get -v github.com/kisielk/errcheck
errcheck -ignoretests $(REPO_PATH)/...
pretest: lint vet # errcheck
test: testdeps pretest
go test $(REPO_PATH)/...
clean:
go clean -i $(REPO_PATH)/...
coverage: testdeps
./coverage.sh --coveralls
.PHONY: \
all \
deps \
updatedeps \
testdeps \
updatetestdeps \
build \
install \
lint \
vet \
errcheck \
pretest \
test \
clean \
coverage