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.

35 lines
1.1 KiB

  1. #!/usr/bin/env bash
  2. VERS=0.7.1
  3. set -eo pipefail
  4. # Edit this line to clone your branch, if you are modifying protobuf files
  5. curl -qL "https://github.com/tendermint/spec/archive/refs/tags/v${VERS}.tar.gz" | tar -xjf - spec-"$VERS"/proto/
  6. cp -r ./spec-"$VERS"/proto/tendermint/** ./proto/tendermint
  7. buf generate --path proto/tendermint
  8. mv ./proto/tendermint/abci/types.pb.go ./abci/types
  9. echo "proto files have been generated"
  10. echo "removing copied files"
  11. rm -rf ./proto/tendermint/abci/types.proto
  12. rm -rf ./proto/tendermint/blocksync/types.proto
  13. rm -rf ./proto/tendermint/consensus/types.proto
  14. rm -rf ./proto/tendermint/mempool/types.proto
  15. rm -rf ./proto/tendermint/p2p/types.proto
  16. rm -rf ./proto/tendermint/p2p/conn.proto
  17. rm -rf ./proto/tendermint/p2p/pex.proto
  18. rm -rf ./proto/tendermint/statesync/types.proto
  19. rm -rf ./proto/tendermint/types/block.proto
  20. rm -rf ./proto/tendermint/types/evidence.proto
  21. rm -rf ./proto/tendermint/types/params.proto
  22. rm -rf ./proto/tendermint/types/types.proto
  23. rm -rf ./proto/tendermint/types/validator.proto
  24. rm -rf ./proto/tendermint/version/version.proto
  25. rm -rf ./spec-"$VERS"