2020-10-15 13:31:50 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-10-19 02:36:40 +00:00
|
|
|
SCRIPTS_DIR=$(dirname "$0")
|
2020-10-15 13:31:50 +00:00
|
|
|
|
2020-10-24 03:36:42 +00:00
|
|
|
PROTO_DIR=$SCRIPTS_DIR/../internal/proto/
|
2020-10-19 02:36:40 +00: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 10:04:57 +00:00
|
|
|
mkdir -p commonpb
|
|
|
|
mkdir -p schemapb
|
|
|
|
mkdir -p etcdpb
|
2021-01-14 06:24:14 +00:00
|
|
|
mkdir -p indexcgopb
|
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
mkdir -p internalpb
|
2021-01-22 01:36:18 +00:00
|
|
|
mkdir -p milvuspb
|
2021-06-22 08:14:09 +00:00
|
|
|
mkdir -p rootcoordpb
|
2021-01-14 06:24:14 +00:00
|
|
|
|
|
|
|
mkdir -p milvuspb
|
|
|
|
mkdir -p proxypb
|
|
|
|
|
|
|
|
mkdir -p indexpb
|
|
|
|
mkdir -p datapb
|
|
|
|
mkdir -p querypb
|
2021-04-29 08:48:06 +00:00
|
|
|
mkdir -p planpb
|
2021-01-14 06:24:14 +00:00
|
|
|
|
2020-10-24 10:04:57 +00: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 06:24:14 +00:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./indexcgopb index_cgo_msg.proto
|
|
|
|
|
2021-01-18 11:32:08 +00:00
|
|
|
#${protoc} --go_out=plugins=grpc,paths=source_relative:./internalpb internal_msg.proto
|
2021-01-16 07:31:10 +00:00
|
|
|
|
2021-06-22 08:14:09 +00:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./rootcoordpb root_coord.proto
|
2020-10-19 02:36:40 +00:00
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./internalpb internal.proto
|
2021-01-14 06:24:14 +00:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./milvuspb milvus.proto
|
2021-06-22 08:14:09 +00: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 02:42:07 +00:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./datapb data_coord.proto
|
2021-06-22 11:08:03 +00:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./querypb query_coord.proto
|
2021-04-29 08:48:06 +00:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./planpb plan.proto
|
2021-06-15 06:43:57 +00:00
|
|
|
${protoc} --go_out=plugins=grpc,paths=source_relative:./segcorepb segcore.proto
|
2021-01-14 06:24:14 +00:00
|
|
|
|
2020-10-19 02:36:40 +00:00
|
|
|
popd
|