-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (34 loc) · 819 Bytes
/
Makefile
File metadata and controls
48 lines (34 loc) · 819 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
GO=go
WORKDIR=`pwd`
Branch=`git rev-parse --abbrev-ref HEAD`
SHA1=`git rev-parse --short HEAD`
Date=`date +"%Y-%m-%d"`
Version=$(Branch)@$(SHA1)@$(Date)
default: vet build
dep:
$(GO) get ./...
cd ./cmd/benchmark
$(GO) get ./...
vet:
$(GO) vet ./...
bin:
@mkdir -p bin
test:
./script/run_kafka.sh run go test ./... -cover
test-verbose:
./script/run_kafka.sh run go test ./... -v -cover
test-race:
./script/run_kafka.sh run go test ./... -v -race -cover
build: build-qservice
build-qservice:
$(GO) build -ldflags "-X main.version=$(Version)" -o qservice .
benchmark:bin vet
$(GO) build -o bin/benchmark ./cmd/benchmark/
states:bin vet
$(GO) build -o bin/states ./cmd/states/
clean:
@-./script/run_kafka.sh clean
@rm -rf bin
@rm -rf qservice
@echo "clean done"
.PHONY: test testdeps vet clean