From cf5b9e59ad40bed1cc874ab4f030ba404c0d31c4 Mon Sep 17 00:00:00 2001 From: Daniel Upton Date: Mon, 15 May 2023 16:44:20 +0100 Subject: [PATCH] tooling: generate protoset file 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 420d66d6a11b..f7b8ce559487 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 $?