Skip to content

Commit efd9955

Browse files
committed
Fix regen proto script after testing it properly
1 parent 734bba1 commit efd9955

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/proto_regen.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
branchOrTag="${1:-main}"
44
dir="tools"
5+
out="weaviate/proto"
56
mkdir -p ${dir}
67
curl -LkSs https://api.github.com/repos/weaviate/weaviate/tarball/${branchOrTag} -o ${dir}/weaviate.tar.gz
78
tar --strip-components=3 -C ${dir} -xvf ${dir}/weaviate.tar.gz $(tar -tf ${dir}/weaviate.tar.gz | grep '^weaviate-weaviate-[^/]\+/grpc/proto/v1')
89

9-
python3 -m grpc_tools.protoc -I ${dir} --python_out=./ --pyi_out=./ --grpc_python_out=./ ${dir}/weaviate/proto/v1/*.proto
10+
python3 -m grpc_tools.protoc -I ${dir} --python_out="./${out}" --pyi_out="./${out}" --grpc_python_out="./${out}" ${dir}/v1/*.proto
1011

1112
rm ${dir}/weaviate.tar.gz
1213

13-
sed -i '' 's/from v1/from weaviate.proto.v1/g' v1/*.py
14-
sed -i '' 's/from v1/from weaviate.proto.v1/g' v1/*.pyi
14+
sed -i '' 's/from v1/from weaviate.proto.v1/g' ${out}/v1/*.py
15+
sed -i '' 's/from v1/from weaviate.proto.v1/g' ${out}/v1/*.pyi
1516

1617
rm -rf ${dir}/v1
1718

0 commit comments

Comments
 (0)