-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (36 loc) · 902 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
48
49
WATCH_INTERVAL=5
TARGET=dist/
all: install
install: dependencies
go install ./...
build: dependencies
go build ./...
dist: dependencies
mkdir -p ${TARGET}
GOARCH=amd64 GOOS=linux go build -o ${TARGET}redis-metrics-linux-amd64
GOARCH=386 GOOS=linux go build -o ${TARGET}redis-metrics-linux-386
GOARCH=amd64 GOOS=darwin go build -o ${TARGET}redis-metrics-darwin-amd64
release: dist
./ci/create-release
dependencies:
go get ./...
test:
go test ./...
go test -race ./...
watch:
watch -n ${WATCH_INTERVAL} make clean test
coverage-ci:
mkdir -p _test
go get -u github.com/pierrre/gotestcover
gotestcover -coverprofile=_test/cover.out ./...
go tool cover -html=_test/cover.out -o=_test/cover.html
coverage: coverage-ci
open _test/cover.html
clean:
rm -rf ${TARGET}
go clean
docker-clean:
docker-compose rm -f
docker: build docker-clean
docker-compose build
docker-compose up