generate-protos.sh 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env bash
  2. (
  3. cd tools/
  4. ./build.sh
  5. npm ci
  6. )
  7. (
  8. cd third_party/
  9. [[ ! -d googleapis ]] && git clone https://github.com/googleapis/googleapis
  10. cd googleapis
  11. git checkout 24fb9e5d1f37110bfa198189c34324aa3fdb0896
  12. )
  13. tools/bin/buf protoc \
  14. -Iproto \
  15. -Ithird_party/googleapis \
  16. --plugin tools/bin/protoc-gen-go \
  17. --go_opt=module=github.com/certusone/wormhole/bridge/pkg \
  18. --go_out=bridge/pkg/ proto/**/**/**
  19. tools/bin/buf protoc \
  20. -Iproto \
  21. -Ithird_party/googleapis \
  22. --plugin tools/bin/protoc-gen-go-grpc \
  23. --go-grpc_opt=module=github.com/certusone/wormhole/bridge/pkg \
  24. --go-grpc_out=bridge/pkg/ proto/**/**/**
  25. mkdir -p explorer/src/proto
  26. tools/bin/buf protoc \
  27. -Iproto \
  28. -Ithird_party/googleapis \
  29. --plugin tools/node_modules/.bin/protoc-gen-ts_proto \
  30. --ts_proto_opt=esModuleInterop=true \
  31. --ts_proto_opt=env=browser \
  32. --ts_proto_opt=forceLong=string \
  33. --ts_proto_opt=outputClientImpl=grpc-web \
  34. --ts_proto_out=explorer/src/proto/ proto/**/**/**