Skip to content

Commit 52b4cba

Browse files
committed
makefile yak shaving...
... for you, Thom.
1 parent 56b9142 commit 52b4cba

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
GO15VENDOREXPERIMENT := 1
21
COVERAGEDIR = coverage
32
ifdef CIRCLE_ARTIFACTS
43
COVERAGEDIR = $(CIRCLE_ARTIFACTS)
54
endif
65

6+
ifdef VERBOSE
7+
V = -v
8+
else
9+
.SILENT:
10+
endif
11+
712
all: test cover
813

914
fmt:
1015
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"
1116

1217
test:
13-
if [ ! -d coverage ]; then mkdir coverage; fi
14-
go test -v ./mpd -race -cover -coverprofile=$(COVERAGEDIR)/mpd.coverprofile
18+
mkdir -p coverage
19+
go test $(V) ./mpd -race -cover -coverprofile=$(COVERAGEDIR)/mpd.coverprofile
1520

1621
cover:
1722
go tool cover -html=$(COVERAGEDIR)/mpd.coverprofile -o $(COVERAGEDIR)/mpd.html

0 commit comments

Comments
 (0)