2024-01-15 04:58:55 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# NOTE: protoc is required
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
REPO_ROOT=$(pwd)
|
|
|
|
I=$REPO_ROOT/proto
|
2024-04-01 07:15:49 +00:00
|
|
|
DEST_TS=$REPO_ROOT/src/proto/
|
2024-01-15 04:58:55 +00:00
|
|
|
|
|
|
|
echo "Generating protobuf files"
|
|
|
|
|
|
|
|
mkdir -p $DEST_TS
|
|
|
|
|
|
|
|
protoc \
|
2024-03-06 06:31:09 +00:00
|
|
|
--plugin=$REPO_ROOT/node_modules/.bin/protoc-gen-ts_proto \
|
|
|
|
--ts_proto_out=$DEST_TS \
|
2024-01-15 04:58:55 +00:00
|
|
|
--proto_path=$I \
|
2024-03-06 06:31:09 +00:00
|
|
|
--ts_proto_opt="esModuleInterop=true,forceLong=long,useOptionals=messages" \
|
2024-03-13 10:29:46 +00:00
|
|
|
$(find $REPO_ROOT/proto/cerc $REPO_ROOT/proto/cosmos/bank -type f -iname "*.proto"
|
|
|
|
)
|