-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
34 lines (23 loc) · 826 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
export GO111MODULE=on
PACKAGES ?= $(shell GO111MODULE=on go list -mod=vendor ./... | grep -v /vendor/)
all: build
build: build-proxy build-config build-ha
build-proxy:
GO111MODULE=on go build -mod=vendor -o bin/codis-proxy ./cmd/proxy
build-config:
GO111MODULE=on go build -mod=vendor -o bin/codis-config ./cmd/cconfig
build-ha:
GO111MODULE=on go build -mod=vendor -o bin/codis-ha ./cmd/ha
update:
go mod tidy -v && go mod vendor
clean:
GO111MODULE=on go clean -i ./...
@rm -rf bin
@rm -f *.rdb *.out *.log *.dump
@if [ -d test ]; then cd test && rm -f *.out *.log *.rdb; fi
fmt:
gofmt -w -s . 2>&1 | grep -vE 'vendor' | awk '{print} END{if(NR>0) {exit 1}}'
vet:
GO111MODULE=on go vet -mod=vendor $(PACKAGES)
test:
GO111MODULE=on go test -mod=vendor -race -cover -coverprofile coverage.out $(PACKAGES)