forked from jaegertracing/jaeger-client-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (54 loc) · 1.62 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
50
51
52
53
54
55
56
57
58
59
60
61
62
-include crossdock/rules.mk
NODE_VER=$(shell node -v)
ifeq ($(patsubst v6.%,matched,$(NODE_VER)), matched)
NODE_6=true
else
NODE_6=false
endif
ifeq ($(patsubst v0.10%,matched,$(NODE_VER)), matched)
NODE_0_10=true
else
NODE_0_10=false
endif
.PHONY: publish
publish: build-node
npm version $(shell ./scripts/version_prompt.sh)
# Make a pull request for this version.
# Follow internal instructions to publish npm through uber account.
# Update Changelog.md to relfect the newest version changes.
.PHONY: test
test: build-node
make test-without-build
.PHONY: test-without-build
test-without-build: install-test-deps
npm run flow
ifeq ($(NODE_6),true)
npm run test-all
endif
npm run test-dist
npm run check-license
.PHONY: install-test-deps
install-test-deps:
ifeq ($(NODE_0_10), false)
npm install prom-client@11.0.0
endif
.PHONY: check-node-6
check-node-6:
@$(NODE_6) || echo Build requires Node 6.x
@$(NODE_6) && echo Building using Node 6.x
.PHONY: build-node
build-node: check-node-6 node-modules
rm -rf ./dist/
node_modules/.bin/babel --presets env --plugins transform-class-properties --source-maps -d dist/src/ src/
node_modules/.bin/babel --presets env --plugins transform-class-properties --source-maps -d dist/test/ test/
node_modules/.bin/babel --presets env --plugins transform-class-properties --source-maps -d dist/crossdock/ crossdock/
cp -R ./test/thrift ./dist/test/thrift/
cp package.json ./dist/
cp -R ./src/jaeger-idl ./dist/src/
rm -rf ./dist/src/jaeger-idl/.git
cp -R ./src/thriftrw-idl ./dist/src/
.PHONY: node-modules
node-modules:
git submodule init -- ./src/jaeger-idl
git submodule update
npm install