Innovenergy_trunk/csharp/lib/Wireformat/build_proto.sh

35 lines
793 B
Bash
Raw Normal View History

2023-02-16 12:57:06 +00:00
#!/bin/bash
proto_dir='./proto'
cs_dir='./cs'
ts_dir='./ts'
for cs in $(find "$cs_dir" -name '*.cs')
do
rm -I "$cs"
done
for ts in $(find "$ts_dir" -name '*.ts')
do
rm -I "$ts"
done
echo "================================================================"
echo "building CS"
echo "================================================================"
echo
for p in $(find "$proto_dir" -name '*.proto')
do
echo building "$p"
protoc -I "$proto_dir" --csharp_out=cs "$p"
done
echo
echo "================================================================"
echo "building TS"
echo "================================================================"
echo
protoc --plugin=node_modules/ts-proto/protoc-gen-ts_proto Payload.proto --ts_proto_opt=esModuleInterop=true -I./proto --ts_proto_out ./ts