devnet: split up proto generation in web and non-web
This avoids requiring npm for "make bridge" Change-Id: I10de809a5d7064b53986acd39e52129db195a235
This commit is contained in:
parent
01564150db
commit
5ad3814575
10
Tiltfile
10
Tiltfile
|
@ -12,7 +12,7 @@ load("ext://namespace", "namespace_create", "namespace_inject")
|
|||
config.define_string("num", False, "Number of guardian nodes to run")
|
||||
|
||||
# You do not usually need to set this argument - this argument is for debugging only. If you do use a different
|
||||
# namespace, note that the "wormhole" namespace is hardcoded in the e2e test and don't forget specifying the argument
|
||||
# namespace, note that the "wormhole" namespace is hardcoded in tests and don't forget specifying the argument
|
||||
# when running "tilt down".
|
||||
#
|
||||
config.define_string("namespace", False, "Kubernetes namespace to use")
|
||||
|
@ -36,6 +36,12 @@ local_resource(
|
|||
cmd = "./generate-protos.sh",
|
||||
)
|
||||
|
||||
local_resource(
|
||||
name = "proto-gen-web",
|
||||
deps = ["./proto", "./generate-protos-web.sh"],
|
||||
cmd = "./generate-protos-web.sh",
|
||||
)
|
||||
|
||||
# bridge
|
||||
|
||||
docker_build(
|
||||
|
@ -150,7 +156,7 @@ k8s_yaml_with_ns("devnet/explorer.yaml")
|
|||
|
||||
k8s_resource(
|
||||
"explorer",
|
||||
resource_deps = ["envoy-proxy"],
|
||||
resource_deps = ["envoy-proxy", "proto-gen-web"],
|
||||
port_forwards = [
|
||||
port_forward(8001, name = "Explorer Web UI [:8001]"),
|
||||
],
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
(
|
||||
cd tools/
|
||||
npm ci
|
||||
)
|
||||
|
||||
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/**/**/**
|
|
@ -3,7 +3,6 @@
|
|||
(
|
||||
cd tools/
|
||||
./build.sh
|
||||
npm ci
|
||||
)
|
||||
|
||||
(
|
||||
|
@ -26,15 +25,3 @@ tools/bin/buf protoc \
|
|||
--plugin tools/bin/protoc-gen-go-grpc \
|
||||
--go-grpc_opt=module=github.com/certusone/wormhole/bridge/pkg \
|
||||
--go-grpc_out=bridge/pkg/ proto/**/**/**
|
||||
|
||||
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/**/**/**
|
||||
|
|
Loading…
Reference in New Issue