-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
201 lines (158 loc) Β· 6.37 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
.PHONY: clean coldstart mrproper up build logs
all: build up
compose := docker-compose
up:
$(compose) up -d
down:
$(compose) down --volumes --remove-orphans
restart:
$(compose) restart
backup-db:
$(compose) exec -T mysql mysqldump --no-create-db lisk -u root -ppassword > mysql_core_index.sql
restore-db:
$(compose) exec -T mysql mysql lisk -u root -ppassword < mysql_core_index.sql
flush-db:
echo "DROP DATABASE lisk; CREATE DATABASE lisk;" | $(compose) exec -T mysql mysql -u root -ppassword
stop-%:
$(compose) stop $*
start-%:
$(compose) start $*
ready:
$(compose) exec -T tests curl --silent --fail 'http://gateway:9901/api/ready' >/dev/null
test: test-functional
test-functional:
$(compose) exec -T tests npm run test:functional
test-integration:
$(compose) exec -T tests npm run test:integration:APIv3:SDKv6
cli: cli-gateway
cli-%:
$(compose) exec $* /bin/sh
mysql-%:
$(compose) exec mysql_$* mysql -u root -ppassword lisk
redis-%:
$(compose) exec redis_$* redis-cli
logs:
$(compose) logs
logs-live:
$(compose) logs --follow
logs-%:
$(compose) logs $*
logs-live-%:
$(compose) logs $* --follow
print-config:
$(compose) config
build: build-app-registry build-connector build-indexer build-coordinator build-statistics build-fees build-market build-export build-gateway
build-all: build build-template build-tests
build-app-registry:
cd ./services/blockchain-app-registry && docker build --tag=lisk/service_blockchain_app_registry ./
build-connector:
cd ./services/blockchain-connector && docker build --tag=lisk/service_blockchain_connector ./
build-indexer:
cd ./services/blockchain-indexer && docker build --tag=lisk/service_blockchain_indexer ./
build-coordinator:
cd ./services/blockchain-coordinator && docker build --tag=lisk/service_blockchain_coordinator ./
build-statistics:
cd ./services/transaction-statistics && docker build --tag=lisk/service_transaction_statistics ./
build-fees:
cd ./services/fee-estimator && docker build --tag=lisk/service_fee_estimator ./
build-market:
cd ./services/market && docker build --tag=lisk/service_market ./
build-export:
cd ./services/export && docker build --tag=lisk/service_export ./
build-gateway:
cd ./services/gateway && docker build --tag=lisk/service_gateway ./
build-template:
cd ./services/template && docker build --tag=lisk/service_template ./
build-tests:
cd ./tests && docker build --tag=lisk/service_tests ./
build-local:
npm ci
cd ./framework && npm ci
cd ./services/blockchain-app-registry && npm ci
cd ./services/blockchain-connector && npm ci
cd ./services/blockchain-coordinator && npm ci
cd ./services/blockchain-indexer && npm ci
cd ./services/transaction-statistics && npm ci
cd ./services/fee-estimator && npm ci
cd ./services/market && npm ci
cd ./services/gateway && npm ci
cd ./services/export && npm ci
cd ./services/template && npm ci
cd ./tests && npm ci
clean: clean-local clean-images
clean-local:
rm -rf node_modules
cd ./framework && rm -rf node_modules
cd ./services/blockchain-app-registry && rm -rf node_modules
cd ./services/blockchain-connector && rm -rf node_modules
cd ./services/blockchain-coordinator && rm -rf node_modules
cd ./services/blockchain-indexer && rm -rf node_modules
cd ./services/transaction-statistics && rm -rf node_modules
cd ./services/fee-estimator && rm -rf node_modules
cd ./services/market && rm -rf node_modules
cd ./services/gateway && rm -rf node_modules
cd ./services/export && rm -rf node_modules
cd ./services/template && rm -rf node_modules
cd ./tests && rm -rf node_modules
clean-images:
docker rmi lisk/service_gateway \
lisk/service_blockchain_app_registry \
lisk/service_blockchain_connector \
lisk/service_blockchain_indexer \
lisk/service_blockchain_coordinator \
lisk/service_transaction_statistics \
lisk/service_fee_estimator \
lisk/service_market \
lisk/service_export \
lisk/service_template \
lisk/service_tests; :
audit:
npm audit; :
cd ./framework && npm audit; :
cd ./services/blockchain-app-registry && npm audit; :
cd ./services/blockchain-connector && npm audit; :
cd ./services/blockchain-coordinator && npm audit; :
cd ./services/blockchain-indexer && npm audit; :
cd ./services/transaction-statistics && npm audit; :
cd ./services/fee-estimator && npm audit; :
cd ./services/market && npm audit; :
cd ./services/gateway && npm audit; :
cd ./services/export && npm audit; :
audit-fix:
npm audit fix; :
cd ./framework && npm audit fix; :
cd ./services/blockchain-app-registry && npm audit fix; :
cd ./services/blockchain-connector && npm audit fix; :
cd ./services/blockchain-coordinator && npm audit fix; :
cd ./services/blockchain-indexer && npm audit fix; :
cd ./services/transaction-statistics && npm audit fix; :
cd ./services/fee-estimator && npm audit fix; :
cd ./services/market && npm audit fix; :
cd ./services/gateway && npm audit fix; :
cd ./services/export && npm audit fix; :
tag-%:
npm version --no-git-tag-version --allow-same-version $*
cd services/gateway && npm version --no-git-tag-version --allow-same-version $*
cd services/blockchain-app-registry && npm version --no-git-tag-version --allow-same-version $*
cd services/blockchain-connector && npm version --no-git-tag-version --allow-same-version $*
cd services/blockchain-coordinator && npm version --no-git-tag-version --allow-same-version $*
cd services/blockchain-indexer && npm version --no-git-tag-version --allow-same-version $*
cd services/transaction-statistics && npm version --no-git-tag-version --allow-same-version $*
cd services/fee-estimator && npm version --no-git-tag-version --allow-same-version $*
cd services/market && npm version --no-git-tag-version --allow-same-version $*
cd services/export && npm version --no-git-tag-version --allow-same-version $*
cd services/template && npm version --no-git-tag-version --allow-same-version $*
git add ./services/gateway/package*.json
git add ./services/blockchain-app-registry/package*.json
git add ./services/blockchain-connector/package*.json
git add ./services/blockchain-coordinator/package*.json
git add ./services/blockchain-indexer/package*.json
git add ./services/transaction-statistics/package*.json
git add ./services/fee-estimator/package*.json
git add ./services/market/package*.json
git add ./services/export/package*.json
git add ./services/template/package*.json
git add ./package*.json
git commit -m ":arrow_up: Version bump to $*"
git tag v$*
mrproper: down clean