forked from hashicorp/consul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (28 loc) · 765 Bytes
/
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
DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
PACKAGES = $(shell go list ./...)
all: deps format
@mkdir -p bin/
@bash --norc -i ./scripts/build.sh
cov:
gocov test ./... | gocov-html > /tmp/coverage.html
open /tmp/coverage.html
deps:
@echo "--> Installing build dependencies"
@go get -d -v ./...
@echo $(DEPS) | xargs -n1 go get -d
test: deps
./scripts/verify_no_uuid.sh
go list ./... | xargs -n1 go test
integ:
go list ./... | INTEG_TESTS=yes xargs -n1 go test
cover: deps
./scripts/verify_no_uuid.sh
go list ./... | xargs -n1 go test --cover
format: deps
@echo "--> Running go fmt"
@go fmt $(PACKAGES)
web:
./scripts/website_run.sh
web-push:
./scripts/website_push.sh
.PHONY: all cov deps integ test web web-push