-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 1.31 KB
/
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
#-----------------------------------------------------------------------------
# Global Variables
#-----------------------------------------------------------------------------
SHELL=bash
APP_VERSION := latest
#-----------------------------------------------------------------------------
# PRE REQUISITE
#-----------------------------------------------------------------------------
.PHONY: prerequisite
prerequisite:
git clone https://github.com/edenhill/librdkafka.git
cd librdkafka && ./configure && make && sudo make install
#-----------------------------------------------------------------------------
# BUILD
#-----------------------------------------------------------------------------
.PHONY: default build test publish build_local lint
default: prerequisite depend test lint build
depend:
go get -u github.com/golang/dep
dep ensure
test:
go test -v ./...
build:
go build
lint:
go get -u github.com/alecthomas/gometalinter
gometalinter --install
gometalinter ./... --exclude=vendor --deadline=60s
#-----------------------------------------------------------------------------
# CLEAN
#-----------------------------------------------------------------------------
.PHONY: clean
clean:
rm -rf kafka-consumer
if [ -d librdkafka ]; then \
cd librdkafka && make clean && make distclean ; \
fi
rm -rf librdkafka