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.

39 lines
1.2 KiB

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