-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (27 loc) · 694 Bytes
/
Makefile
File metadata and controls
31 lines (27 loc) · 694 Bytes
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
.DEFAULT_GOAL := test
TESTPKG = ./...
VERBOSE_FLAG = $(if $(VERBOSE),-v)
# lint
lint-deps:
which golint || go get golang.org/x/lint/golint
lint: lint-deps
go vet ./...
rm -f .golint.txt
golint ./... | grep -v 'internal.*exported\|translatedassert.*\(package comment\|exported\|underscores\)' | tee .golint.txt
test ! -s .golint.txt
# test
test-deps:
which dep || curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
test: test-deps
go test $(VERBOSE_FLAG) $(TESTPKG)
test-integration: test
cd _integrationtest && ./test.sh
# run example
example:
go test ./_example
# generate
gen-readme:
_misc/gen-readme.bash
gen-op:
_misc/gen-op.bash
gen: gen-op gen-readme