-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (16 loc) · 780 Bytes
/
Makefile
File metadata and controls
21 lines (16 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
GO := go
GOBUILD := CGO_ENABLED=0 $(GO) build
LDFLAGS += -X "github.com/bytewatch/dolphinbeat/util.BuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
LDFLAGS += -X "github.com/bytewatch/dolphinbeat/util.GitHash=$(shell git rev-parse --short HEAD)"
.PHONY: all dolphinbeat kafka-consumer
all: dolphinbeat kafka-consumer
dolphinbeat:
mkdir -p build/dolphinbeat/bin && mkdir -p build/dolphinbeat/etc
cd cmd/dolphinbeat/ && $(GOBUILD) -ldflags '$(LDFLAGS)' -o ../../build/dolphinbeat/bin/dolphinbeat
cp -r cmd/dolphinbeat/dolphinbeat.toml.* build/dolphinbeat/etc/
test:
cd canal && go test -v
cd dump && go test -v
cd ckp && go test -v
kafka-consumer:
cd cmd/tools/kafka-consumer && $(GOBUILD) -ldflags '$(LDFLAGS)' -o ../../../build/dolphinbeat/bin/kafka-consumer