-
Notifications
You must be signed in to change notification settings - Fork 10
/
generate-registry.sh
25 lines (19 loc) · 1.04 KB
/
generate-registry.sh
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
#!/usr/bin/env bash
set -eo pipefail
echo "Generating registry…"
TX_FILES=$(find src/codec -path -prune -o -name '*.ts')
echo $TX_FILES
REGISTRY_FILE=src/codec/index.ts
COSMOS_MODELS_FILE=src/codec/cosmos-models.ts
IBC_MODELS_FILE=src/codec/ibc-models.ts
POLYNETWORK_MODELS_FILE=src/codec/polynetwork-models.ts
ETHERMINT_MODELS_FILE=src/codec/ethermint-models.ts
CARBON_MODELS_FILE=src/codec/carbon-models.ts
ts-node ./scripts/generate-cosmos-models.ts $PWD $COSMOS_MODELS_FILE
ts-node ./scripts/generate-ibc-models.ts $PWD $IBC_MODELS_FILE
ts-node ./scripts/generate-polynetwork-models.ts $PWD $POLYNETWORK_MODELS_FILE
ts-node ./scripts/generate-ethermint-models.ts $PWD $ETHERMINT_MODELS_FILE
ts-node ./scripts/generate-carbon-models.ts $PWD $CARBON_MODELS_FILE
echo "// GENERATED by scripts/generate-registry.sh" > $REGISTRY_FILE
ts-node ./scripts/generate-registry.ts $TX_FILES $PWD $REGISTRY_FILE $POLYNETWORK_MODELS_FILE $CARBON_MODELS_FILE $COSMOS_MODELS_FILE $IBC_MODELS_FILE $ETHERMINT_MODELS_FILE >> $REGISTRY_FILE
rm -rf ./scripts/protobuf-def.json