github.com/DFWallet/tendermint-cosmos@v0.0.2/scripts/protocgen.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -eo pipefail
     4  
     5  proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
     6  for dir in $proto_dirs; do
     7    buf protoc \
     8    -I "proto" \
     9    -I "third_party/proto" \
    10    --gogofaster_out=\
    11  Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
    12  Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,\
    13  plugins=grpc,paths=source_relative:. \
    14    $(find "${dir}" -maxdepth 1 -name '*.proto')
    15  done
    16  
    17  cp -r ./tendermint/* ./proto/*
    18  rm -rf tendermint
    19  
    20  mv ./proto/tendermint/abci/types.pb.go ./abci/types
    21  
    22  mv ./proto/tendermint/rpc/grpc/types.pb.go ./rpc/grpc