diff --git a/seekers/grpc/compile_protos.sh b/seekers/grpc/compile_protos.sh index b0cfd16..f9aa211 100644 --- a/seekers/grpc/compile_protos.sh +++ b/seekers/grpc/compile_protos.sh @@ -1,16 +1,18 @@ -#!/bin/zsh +#!/bin/bash git submodule update --init --recursive rm -rf stubs mkdir stubs +mapfile -d '' proto_src_files < <(find proto/src/main/proto -name '*.proto' -print0) + python -m grpc_tools.protoc \ --python_out=stubs \ --grpc_python_out=stubs \ --proto_path=proto/src/main/proto \ --mypy_out=stubs \ - proto/src/main/proto/**/*.proto + "${proto_src_files[@]}" # invoke proletariat to fix broken imports @@ -18,4 +20,4 @@ protol \ --create-package \ --in-place \ --python-out stubs \ - protoc --proto-path=proto/src/main/proto proto/src/main/proto/**/*.proto + protoc --proto-path=proto/src/main/proto "${proto_src_files[@]}"