2020-10-15 21:31:50 +08:00
|
|
|
#!/usr/bin/env bash
|
2021-10-09 18:01:27 +08:00
|
|
|
|
|
|
|
# Licensed to the LF AI & Data foundation under one
|
|
|
|
# or more contributor license agreements. See the NOTICE file
|
|
|
|
# distributed with this work for additional information
|
|
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
|
|
# to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
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
|
|
|
|
2021-09-29 20:44:09 +08:00
|
|
|
mkdir -p segcorepb
|
2021-01-14 14:24:14 +08:00
|
|
|
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-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
|