blob: 25c5bc2071e4de08bb56ab31f487fbd31bdc6df1 [file] [log] [blame]
Takahiro Suzuki241c10e2020-12-17 20:17:57 +09001SCALA_VERSION?= 2.12
2KAFKA_VERSION?= 1.1.0
3KAFKA_DIR= kafka_$(SCALA_VERSION)-$(KAFKA_VERSION)
4KAFKA_SRC= https://archive.apache.org/dist/kafka/$(KAFKA_VERSION)/$(KAFKA_DIR).tgz
5KAFKA_ROOT= testdata/$(KAFKA_DIR)
6PKG=$(shell go list ./... | grep -v vendor)
7
8default: vet test
9
10vet:
11 go vet $(PKG)
12
13test: testdeps
14 KAFKA_DIR=$(KAFKA_DIR) go test $(PKG) -ginkgo.slowSpecThreshold=60
15
16test-verbose: testdeps
17 KAFKA_DIR=$(KAFKA_DIR) go test $(PKG) -ginkgo.slowSpecThreshold=60 -v
18
19test-race: testdeps
20 KAFKA_DIR=$(KAFKA_DIR) go test $(PKG) -ginkgo.slowSpecThreshold=60 -v -race
21
22testdeps: $(KAFKA_ROOT)
23
24doc: README.md
25
26.PHONY: test testdeps vet doc
27
28# ---------------------------------------------------------------------
29
30$(KAFKA_ROOT):
31 @mkdir -p $(dir $@)
32 cd $(dir $@) && curl -sSL $(KAFKA_SRC) | tar xz
33
34README.md: README.md.tpl $(wildcard *.go)
35 becca -package $(subst $(GOPATH)/src/,,$(PWD))