-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 837 Bytes
/
Makefile
File metadata and controls
38 lines (28 loc) · 837 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
32
33
34
35
36
37
38
COVERAGEDIR = coverage
ifdef CIRCLE_ARTIFACTS
COVERAGEDIR = $(CIRCLE_ARTIFACTS)
endif
ifdef VERBOSE
V = -v
else
.SILENT:
endif
all: test cover
fmt:
find . -not -path "./vendor/*" -name '*.go' -type f | sed 's#\(.*\)/.*#\1#' | sort -u | xargs -n1 -I {} bash -c "cd {} && goimports -w *.go && gofmt -w -s -l *.go"
test:
mkdir -p coverage
go test $(V) ./mpd -race -cover -coverprofile=$(COVERAGEDIR)/mpd.coverprofile
cover:
go tool cover -html=$(COVERAGEDIR)/mpd.coverprofile -o $(COVERAGEDIR)/mpd.html
tc: test cover
coveralls:
gover $(COVERAGEDIR) $(COVERAGEDIR)/coveralls.coverprofile
goveralls -coverprofile=$(COVERAGEDIR)/coveralls.coverprofile -service=circle-ci -repotoken=$(COVERALLS_TOKEN)
clean:
go clean
rm -rf coverage/
examples-live:
go run examples/live.go
examples-ondemand:
go run examples/ondemand.go