-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (28 loc) · 772 Bytes
/
Makefile
File metadata and controls
33 lines (28 loc) · 772 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
.PHONY: format
format:
@find . -type f -name "*.go" -print0 | xargs -0 gofmt -s -w
.PHONY: bench
bench:
GOPATH=$(GOPATH) go test -bench=.
# Clean junk
.PHONY: clean
clean:
GOPATH=$(GOPATH) go clean ./...
.PHONY: clean-mac
clean-mac: clean
find . -name ".DS_Store" -print0 | xargs -0 rm
.PHONY: test
test:
-rm coverage.txt
@for package in $$(go list ./... | grep -v example) ; do \
GOPATH=$(GOPATH) go test -race -coverprofile=profile.out -covermode=atomic $$package ; \
if [ -f profile.out ]; then \
cat profile.out >> coverage.txt ; \
rm profile.out ; \
fi \
done
update_deps:
GOPATH=$(GOPATH) GO111MODULE=on go mod verify
GOPATH=$(GOPATH) GO111MODULE=on go mod tidy
GOPATH=$(GOPATH) rm -rf vendor
GOPATH=$(GOPATH) GO111MODULE=on go mod vendor