From ce24646d367e39a4b69011564b878fcfd8cbaa2f Mon Sep 17 00:00:00 2001 From: Dan Upton Date: Mon, 26 Jun 2023 13:53:55 +0100 Subject: [PATCH] tooling: generate protoset file (#17364) Extends the `proto` make target to generate a protoset file for use with grpcurl etc. --- build-support/scripts/protobuf.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build-support/scripts/protobuf.sh b/build-support/scripts/protobuf.sh index 420d66d6a1..f7b8ce5594 100755 --- a/build-support/scripts/protobuf.sh +++ b/build-support/scripts/protobuf.sh @@ -72,6 +72,10 @@ function main { status "Generated gRPC rate limit mapping file" + generate_protoset_file + + status "Generated protoset file" + return 0 } @@ -152,5 +156,11 @@ function generate_rate_limit_mappings { } } +function generate_protoset_file { + local pkg_dir="${SOURCE_DIR}/pkg" + mkdir -p "$pkg_dir" + print_run buf build -o "${pkg_dir}/consul.protoset" +} + main "$@" exit $?