forked from jaegertracing/jaeger-idl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (27 loc) · 1.2 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
THRIFT_VER=0.9.2
THRIFT_IMG=thrift:$(THRIFT_VER)
THRIFT=docker run -u $(shell id -u) -v "${PWD}:/data" $(THRIFT_IMG) thrift
SWAGGER_VER=0.12.0
SWAGGER_IMAGE=quay.io/goswagger/swagger:$(SWAGGER_VER)
SWAGGER=docker run --rm -it -u ${shell id -u} -v "${PWD}:/go/src/${PROJECT_ROOT}" -w /go/src/${PROJECT_ROOT} $(SWAGGER_IMAGE)
THRIFT_GO_ARGS=thrift_import="github.com/apache/thrift/lib/go/thrift"
THRIFT_PY_ARGS=new_style,tornado
THRIFT_JAVA_ARGS=private-members
THRIFT_PHP_ARGS=psr4
THRIFT_GEN=--gen go:$(THRIFT_GO_ARGS) --gen py:$(THRIFT_PY_ARGS) --gen java:$(THRIFT_JAVA_ARGS) --gen js:node --gen cpp --gen php:$(THRIFT_PHP_ARGS)
THRIFT_CMD=$(THRIFT) -o /data $(THRIFT_GEN)
THRIFT_FILES=agent.thrift jaeger.thrift sampling.thrift zipkincore.thrift crossdock/tracetest.thrift \
baggage.thrift dependency.thrift aggregation_validator.thrift
test-ci: thrift swagger-validate
swagger-validate:
$(SWAGGER) validate ./swagger/zipkin2-api.yaml
clean:
rm -rf gen-* || true
thrift: thrift-image clean $(THRIFT_FILES)
$(THRIFT_FILES):
@echo Compiling $@
$(THRIFT_CMD) /data/thrift/$@
thrift-image:
docker pull $(THRIFT_IMG)
$(THRIFT) -version
.PHONY: test-ci clean thrift thrift-image $(THRIFT_FILES) swagger-validate