| #!/bin/bash |
| |
| set -o errexit |
| set -o nounset |
| set -o pipefail |
| |
| # TODO(chases2): Pull from git instead of local directory |
| DEST=~/github/testgrid-ui/pb |
| |
| # API & Explicit dependencies only! |
| # TODO(chases2): Decrease dependencies upstream |
| for PROTO in api/v1/data.proto config/config.proto state/state.proto custom_evaluator/custom_evaluator.proto test_status/test_status.proto |
| do |
| cp ~/github/testgrid/pb/${PROTO} ${DEST}/${PROTO} |
| done |
| cp ~/github/testgrid/pb/README.md ${DEST} |
| |
| cd ~/github/testgrid-ui |
| PROTO_DEST=~/github/testgrid-ui/src/gen |
| |
| # See https://github.com/timostamm/protobuf-ts/blob/master/MANUAL.md |
| npx protoc --ts_out ${PROTO_DEST} --proto_path . --ts_opt long_type_string \ |
| ./pb/custom_evaluator/custom_evaluator.proto \ |
| ./pb/state/state.proto \ |
| ./pb/config/config.proto \ |
| ./pb/test_status/test_status.proto \ |
| ./pb/api/v1/data.proto |
| |