Skip to content

Commit

Permalink
migrating compile script from zsh to bash
Browse files Browse the repository at this point in the history
  • Loading branch information
Belissimo-T committed Dec 3, 2023
1 parent 34c6366 commit 747dd94
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions seekers/grpc/compile_protos.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/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

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[@]}"

0 comments on commit 747dd94

Please sign in to comment.