-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
47 lines (39 loc) · 985 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
39
40
41
42
43
44
45
46
47
.DEFAULT_GOAL = build
# Get all dependencies
setup:
# Only install if missing
ifeq (,$(wildcard bin/golangci-lint))
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh
endif
go mod download
.PHONY: setup
# Build jaeger
build:
go build
.PHONY: build
# Clean all build artifacts
clean:
rm -rf dist
rm -rf coverage
rm -f jaeger
.PHONY: clean
# Run the linter
lint:
./bin/golangci-lint run ./...
.PHONY: lint
# Remove version of tb installed with go install
go-uninstall:
rm $(shell go env GOPATH)/bin/jaeger
.PHONY: go-uninstall
# Run tests and collect coverage data
test:
mkdir -p coverage
go test -coverpkg=./... -coverprofile=coverage/coverage.txt ./...
go tool cover -html=coverage/coverage.txt -o coverage/coverage.html
.PHONY: test
# Run tests and print coverage data to stdout
test-ci:
mkdir -p coverage
go test -coverpkg=./... -coverprofile=coverage/coverage.txt ./...
go tool cover -func=coverage/coverage.txt
.PHONY: test-ci