We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 32fe66c + df35487 commit 84571ebCopy full SHA for 84571eb
tools/proto_regen.sh
@@ -0,0 +1,18 @@
1
+#!/bin/bash
2
+
3
+branchOrTag="${1:-main}"
4
+dir="tools"
5
+mkdir -p ${dir}
6
+curl -LkSs https://api.github.com/repos/weaviate/weaviate/tarball/${branchOrTag} -o ${dir}/weaviate.tar.gz
7
+tar --strip-components=3 -C ${dir} -xvf ${dir}/weaviate.tar.gz $(tar -tf ${dir}/weaviate.tar.gz | grep '^weaviate-weaviate-[^/]\+/grpc/proto/v1')
8
9
+python3 -m grpc_tools.protoc -I ${dir} --python_out=./ --pyi_out=./ --grpc_python_out=./ ${dir}/weaviate/proto/v1/*.proto
10
11
+rm ${dir}/weaviate.tar.gz
12
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
15
16
+rm -rf ${dir}/v1
17
18
+echo "done"
0 commit comments