github.com/cosmos/cosmos-proto@v1.0.0-beta.3/scripts/genproto.sh (about) 1 #!/bin/sh 2 3 set -e 4 5 build() { 6 echo finding protobuf files in "$1" 7 proto_files=$(find "$1" -name "*.proto") 8 for file in $proto_files; do 9 echo "building proto file $file" 10 protoc -I=. -I=./third_party/proto --plugin /usr/bin/protoc-gen-go-pulsar --go-pulsar_out=. --go-pulsar_opt=features=fast "$file" 11 done 12 } 13 14 cosmos_proto() { 15 echo "generating cosmos.proto" 16 protoc -I=. -I=./third_party/proto cosmos.proto --go_out=. 17 } 18 19 cosmos_proto 20 for dir in "$@" 21 do 22 build "$dir" 23 done 24 25 cp -r github.com/cosmos/cosmos-proto/* ./ 26 rm -rf github.com