2020-10-15 21:31:50 +08:00
|
|
|
#!/usr/bin/env bash
|
2020-10-19 10:36:40 +08:00
|
|
|
SCRIPTS_DIR=$(dirname "$0")
|
2020-10-15 21:31:50 +08:00
|
|
|
|
2020-10-24 11:36:42 +08:00
|
|
|
PROTO_DIR=$SCRIPTS_DIR/../internal/proto/
|
2020-10-19 10:36:40 +08:00
|
|
|
|
|
|
|
PROGRAM=$(basename "$0")
|
|
|
|
GOPATH=$(go env GOPATH)
|
|
|
|
|
|
|
|
if [ -z $GOPATH ]; then
|
|
|
|
printf "Error: the environment variable GOPATH is not set, please set it before running %s\n" $PROGRAM > /dev/stderr
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
export PATH=${GOPATH}/bin:$PATH
|
|
|
|
echo `which protoc-gen-go`
|
|
|
|
|
|
|
|
# official go code ship with the crate, so we need to generate it manually.
|
|
|
|
pushd ${PROTO_DIR}
|
|
|
|
|
2020-10-24 18:04:57 +08:00
|
|
|
mkdir -p commonpb
|
|
|
|
mkdir -p schemapb
|
|
|
|
mkdir -p etcdpb
|
2021-01-14 14:24:14 +08:00
|
|
|
mkdir -p indexcgopb
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
mkdir -p internalpb
|
2021-01-22 09:36:18 +08:00
|
|
|
mkdir -p milvuspb
|
2021-06-22 16:14:09 +08:00
|
|
|
mkdir -p rootcoordpb
|
2021-01-14 14:24:14 +08:00
|
|
|
|
|
|
|
mkdir -p milvuspb
|
|
|
|
mkdir -p proxypb
|
|
|
|
|
|
|
|
mkdir -p indexpb
|
|
|
|
mkdir -p datapb
|
|
|
|
mkdir -p querypb
|
2021-04-29 16:48:06 +08:00
|
|
|
mkdir -p planpb
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2020-10-24 18:04:57 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./commonpb common.proto
|
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./schemapb schema.proto
|
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./etcdpb etcd_meta.proto
|
2021-01-14 14:24:14 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./indexcgopb index_cgo_msg.proto
|
|
|
|
|
2021-01-18 19:32:08 +08:00
|
|
|
#${protoc} --go_out=plugins=grpc,paths=source_relative:./internalpb internal_msg.proto
|
2021-01-16 15:31:10 +08:00
|
|
|
|
2021-06-22 16:14:09 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./rootcoordpb root_coord.proto
|
2020-10-19 10:36:40 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./internalpb internal.proto
|
2021-01-14 14:24:14 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./milvuspb milvus.proto
|
2021-06-22 16:14:09 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./proxypb proxy.proto
|
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./indexpb index_coord.proto
|
2021-06-22 10:42:07 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./datapb data_coord.proto
|
2021-06-22 19:08:03 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./querypb query_coord.proto
|
2021-04-29 16:48:06 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./planpb plan.proto
|
2021-06-15 14:43:57 +08:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./segcorepb segcore.proto
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2020-10-19 10:36:40 +08:00
|
|
|
popd
|