You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
640 B

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