* grpc for bank module * edit module.go * added annotations for x/auth query proto * generated gw file * added grpc gateway for x/staking query proto * added annotations for evidence * added annotations for gov query proto * added annotations * added annotations for slashing module * updated annotations * added annotations for staking module * added annotations for upgrade query * annotations added for x/ibc/channel query proto * added annotations for ibc/connection query proto * updated annotations * updated annotations * annotation changes * ommitted ibc module * updated go.mod * fixed lint issue * review changes * review changes * review changes * review changes * go sum changes * updated annotations * annotation changes * Fix proto lint issues * review changes * review changes * review changes * discussion changes * review changes * grpc for bank module * edit module.go * added annotations for x/auth query proto * generated gw file * added grpc gateway for x/staking query proto * added annotations for evidence * added annotations for gov query proto * added annotations * added annotations for slashing module * updated annotations * added annotations for staking module * added annotations for upgrade query * annotations added for x/ibc/channel query proto * added annotations for ibc/connection query proto * updated annotations * updated annotations * annotation changes * ommitted ibc module * updated go.mod * fixed lint issue * review changes * review changes * review changes * review changes * go sum changes * updated annotations * annotation changes * Fix proto lint issues * review changes * review changes * review changes * discussion changes * review changes * fixed conflicts * review changes * updated gw files * lint * lint * lint * added missing annotations * review changes * review changes * review changes * review changes Co-authored-by: SaReN <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
31 lines
962 B
Bash
Executable File
31 lines
962 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eo pipefail
|
|
|
|
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
|
|
for dir in $proto_dirs; do
|
|
protoc \
|
|
-I "proto" \
|
|
-I "third_party/proto" \
|
|
--gocosmos_out=plugins=interfacetype+grpc,\
|
|
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
|
|
$(find "${dir}" -maxdepth 1 -name '*.proto')
|
|
|
|
# command to generate gRPC gateway (*.pb.gw.go in respective modules) files
|
|
protoc \
|
|
-I "proto" \
|
|
-I "third_party/proto" \
|
|
--grpc-gateway_out=logtostderr=true:. \
|
|
$(find "${dir}" -maxdepth 1 -name '*.proto')
|
|
done
|
|
|
|
# generate codec/testdata proto code
|
|
protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\
|
|
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/proto.proto
|
|
|
|
# move proto files to the right places
|
|
cp -r github.com/cosmos/cosmos-sdk/* ./
|
|
rm -rf github.com
|
|
|
|
|