milvus/scripts/update-api-version.sh
SimFG e10d21ef90
Improve the download_milvus_proto bash (#19894)
Signed-off-by: SimFG <bang.fu@zilliz.com>

Signed-off-by: SimFG <bang.fu@zilliz.com>
2022-10-19 20:45:32 +08:00

24 lines
615 B
Bash
Executable File

#!/usr/bin/env bash
function line()
{
echo "----------------------------"
}
line
echo "Update the milvus-proto/api version"
commitID=$(git ls-remote https://github.com/milvus-io/milvus-proto.git refs/heads/master | cut -f 1)
go get github.com/milvus-io/milvus-proto/go-api@$commitID
SCRIPTS_DIR=$(dirname "$0")
EXAMPLE_DIR=$SCRIPTS_DIR/../cmake_build/thirdparty/protobuf/protobuf-src/examples
rm -rf $EXAMPLE_DIR
go mod tidy
line echo "Update the milvus-proto repo"
THIRD_PARTY_DIR=$SCRIPTS_DIR/../cmake_build/thirdparty
pushd $THIRD_PARTY_DIR/milvus-proto
git checkout master
git pull origin master
popd