-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
33 lines (23 loc) · 854 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
SCALA_VERSION ?= 2.12
KAFKA_VERSION ?= 1.0.0
KAFKA_DIR = kafka_$(SCALA_VERSION)-$(KAFKA_VERSION)
APACHE_MIRROR ?= https://mirrors.tuna.tsinghua.edu.cn/apache
KAFKA_SRC = $(APACHE_MIRROR)/kafka/$(KAFKA_VERSION)/$(KAFKA_DIR).tgz
KAFKA_ROOT = testdata/$(KAFKA_DIR)
PKG=$(shell go list ./... | grep -v vendor)
default: vet test
vet:
go vet $(PKG)
test: testdeps
KAFKA_DIR=$(KAFKA_DIR) go test $(PKG) -ginkgo.slowSpecThreshold=60
test-verbose: testdeps
KAFKA_DIR=$(KAFKA_DIR) go test $(PKG) -ginkgo.slowSpecThreshold=60 -v
test-race: testdeps
KAFKA_DIR=$(KAFKA_DIR) go test $(PKG) -ginkgo.slowSpecThreshold=60 -v -race
testdeps: $(KAFKA_ROOT)
doc: README.md
.PHONY: test testdeps vet doc
# ---------------------------------------------------------------------
$(KAFKA_ROOT):
@mkdir -p $(dir $@)
cd $(dir $@) && curl -sSL $(KAFKA_SRC) | tar xz