2021-01-23 09:20:17 -08:00
|
|
|
#!/usr/bin/env bash
|
2020-08-15 13:14:24 -07:00
|
|
|
|
|
|
|
(
|
|
|
|
cd tools/
|
2020-10-16 11:48:53 -07:00
|
|
|
./build.sh
|
2021-07-02 04:01:54 -07:00
|
|
|
npm ci
|
2020-08-15 13:14:24 -07:00
|
|
|
)
|
|
|
|
|
2020-10-28 14:41:35 -07:00
|
|
|
(
|
|
|
|
cd third_party/
|
|
|
|
[[ ! -d googleapis ]] && git clone https://github.com/googleapis/googleapis
|
|
|
|
cd googleapis
|
|
|
|
git checkout 24fb9e5d1f37110bfa198189c34324aa3fdb0896
|
|
|
|
)
|
|
|
|
|
2020-08-20 09:42:46 -07:00
|
|
|
tools/bin/buf protoc \
|
2020-10-28 14:41:35 -07:00
|
|
|
-Iproto \
|
|
|
|
-Ithird_party/googleapis \
|
2020-08-20 09:42:46 -07:00
|
|
|
--plugin tools/bin/protoc-gen-go \
|
2021-05-26 12:07:59 -07:00
|
|
|
--go_opt=module=github.com/certusone/wormhole/bridge/pkg \
|
2020-08-20 09:42:46 -07:00
|
|
|
--go_out=bridge/pkg/ proto/**/**/**
|
|
|
|
|
|
|
|
tools/bin/buf protoc \
|
2020-10-28 14:41:35 -07:00
|
|
|
-Iproto \
|
|
|
|
-Ithird_party/googleapis \
|
|
|
|
--plugin tools/bin/protoc-gen-go-grpc \
|
2021-05-26 12:07:59 -07:00
|
|
|
--go-grpc_opt=module=github.com/certusone/wormhole/bridge/pkg \
|
2020-10-28 14:41:35 -07:00
|
|
|
--go-grpc_out=bridge/pkg/ proto/**/**/**
|
2021-05-25 00:51:49 -07:00
|
|
|
|
2021-07-02 04:01:54 -07:00
|
|
|
mkdir -p explorer/src/proto
|
|
|
|
|
|
|
|
tools/bin/buf protoc \
|
|
|
|
-Iproto \
|
|
|
|
-Ithird_party/googleapis \
|
|
|
|
--plugin tools/node_modules/.bin/protoc-gen-ts_proto \
|
|
|
|
--ts_proto_opt=esModuleInterop=true \
|
|
|
|
--ts_proto_opt=env=browser \
|
|
|
|
--ts_proto_opt=forceLong=string \
|
|
|
|
--ts_proto_opt=outputClientImpl=grpc-web \
|
|
|
|
--ts_proto_out=explorer/src/proto/ proto/**/**/**
|