-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
127 lines (97 loc) · 2.78 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
MODULE?=
NODE_APPS?=
NODE_VERSION=5.6.0
VERSION=
_default: run
audit:
SKIP_FILES=true $(MAKE) nsp
clean:
for nodeApp in $(NODE_APPS); do cd $$nodeApp && rm -rf node_modules && cd ..; done
rm -rf trace-importer
rm -rf bondmath
rm -rf node-python
rm -rf settlement=mock-provider
clean-queues:
for nodeApp in $(NODE_APPS); do cd $$nodeApp && rm -f .queues* && cd ..; done
install-pre:
$(MAKE) maybe-npm-install-global APPS="n supervisor bower npm-cache"
install-node-apps:
-n node $(NODE_VERSION)
for nodeApp in $(NODE_APPS); do cd $$nodeApp && $(NPM_INSTALL_APP) install && cd ..; done
install-without-node-switching:
PATH="$(shell dirname $(shell n which $(NODE_VERSION))):$$PATH" && \
(for nodeApp in $(NODE_APPS); do cd $$nodeApp && npm install && cd ..; done)
install: install-tools install-python-apps install-pre install-node-apps
-n node $(NODE_VERSION)
kill-all:
-killall -9 node python
-tmux kill-session -t copy-doc
link-for-all:
for app in $(NODE_APPS); do cd $$app && npm link $(MODULE) && cd ..; done
rebuild-no-cache:
$(MAKE) NPM_INSTALL_APP=npm clean install init-submodules
rebuild: clean install init-submodules
init-submodules:
gits submodule init
gits submodule update
install-tools:
if test `which tmux`; then \
echo 'tmux installed. continuing'; \
else \
echo 'installing tmux'; \
brew install tmux; \
fi
if test `which tmuxinator`; then \
echo 'tmuxinator installed. continuing'; \
export EDITOR='vim'; \
else \
echo 'installing tmux'; \
gem install tmuxinator; \
export EDITOR='vim'; \
fi
manage-rabbitmq-qa:
open http://localhost:3002 && ssh -L3002:nj1smq01:15672 staging
manage-rabbitmq-prod:
open http://localhost:3001 && ssh -L3001:nj1pmq01:15672 production
nsp:
./infra-tools/static-analysis/nsp.sh
populate:
gits populate
reset-all: kill-all reset-queues reset-redis
reset-queues: clean-queues
rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app
rabbitmqctl set_vm_memory_high_watermark 0.8
reset-redis:
redis-cli FLUSHALL
run:
$(MAKE) run-only
run-only:
mkdir -p ~/.tmuxinator
cp ./tmuxinator.all.yml ~/.tmuxinator/copy-doc.yml
NO_WEB=$(NO_WEB) mux copy-doc
run-no-web:
$(MAKE) NO_WEB=true run-only
test: test-unit test-integration
test-integration:
cd test-suite; \
make test; \
test-unit:
testsuitestring='test-suite'
for dir in * ; do \
if [ -d $$dir ] && [ -f ./$$dir/node_modules/.bin/mocha ] ; then \
echo running for mocha $$dir ; \
cd $$dir; \
make LOG_LEVEL=50 test; \
echo \\n; \
cd ..; \
else \
echo mocha not found. skipping for $$dir \\n; \
fi \
done
unlink-for-all:
for app in $(NODE_APPS); do cd $$app && npm unlink $(MODULE) && cd ..; done
update-module-for-all:
for app in $(NODE_APPS); do cd $$app && update-package-dot-json $(MODULE) $(VERSION) && cd ..; done
.PHONY: test