mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
Improve the download_milvus_proto
bash (#19894)
Signed-off-by: SimFG <bang.fu@zilliz.com> Signed-off-by: SimFG <bang.fu@zilliz.com>
This commit is contained in:
parent
87248dc1a9
commit
e10d21ef90
8
Makefile
8
Makefile
@ -118,16 +118,14 @@ embd-milvus: build-cpp-embd print-build-info
|
||||
GO111MODULE=on $(GO) build -ldflags="-r /tmp/milvus/lib/ -X '$(OBJPREFIX).BuildTags=$(BUILD_TAGS)' -X '$(OBJPREFIX).BuildTime=$(BUILD_TIME)' -X '$(OBJPREFIX).GitCommit=$(GIT_COMMIT)' -X '$(OBJPREFIX).GoVersion=$(GO_VERSION)'" \
|
||||
${APPLE_SILICON_FLAG} -buildmode=c-shared -o $(INSTALL_PATH)/embd-milvus.so $(PWD)/pkg/embedded/embedded.go 1>/dev/null
|
||||
|
||||
update-milvus-api: update-api-version download-milvus-proto
|
||||
update-milvus-api: download-milvus-proto
|
||||
@echo "Update milvus/api version ..."
|
||||
@(env bash $(PWD)/scripts/update-api-version.sh)
|
||||
|
||||
download-milvus-proto:
|
||||
@echo "Download milvus-proto repo ..."
|
||||
@(env bash $(PWD)/scripts/download_milvus_proto.sh)
|
||||
|
||||
update-api-version:
|
||||
@echo "Update milvus/api version ..."
|
||||
@(env bash $(PWD)/scripts/update-api-version.sh)
|
||||
|
||||
build-cpp: download-milvus-proto
|
||||
@echo "Building Milvus cpp library ..."
|
||||
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -f "$(CUSTOM_THIRDPARTY_PATH)" -n ${disk_index})
|
||||
|
2
go.sum
2
go.sum
@ -493,8 +493,6 @@ github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyex
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b h1:TfeY0NxYxZzUfIfYe5qYDBzt4ZYRqzUjTR6CvUzjat8=
|
||||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4=
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20221014075920-6c03ca8c3749 h1:IB+Jyx3dVtrMSGYYVlobkSC9Kat+lxd/GM1i0cKIJXA=
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20221014075920-6c03ca8c3749/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20221017091121-7a703d4485b5 h1:CDEQi9T8A7YEtQwHXEBXTl/PDXLzzJSRral8TM+1Krk=
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20221017091121-7a703d4485b5/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
|
||||
github.com/milvus-io/pulsar-client-go v0.6.8 h1:fZdZH73aPRszu2fazyeeahQEz34tyn1Pt9EkqJmV100=
|
||||
|
20
scripts/download_milvus_proto.sh
Normal file → Executable file
20
scripts/download_milvus_proto.sh
Normal file → Executable file
@ -1,14 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPTS_DIR=$(dirname "$0")
|
||||
THIRD_PARTY_DIR=$SCRIPTS_DIR/../cmake_build/thirdparty/
|
||||
THIRD_PARTY_DIR=$SCRIPTS_DIR/../cmake_build/thirdparty
|
||||
|
||||
if [ ! -d "$THIRD_PARTY_DIR/milvus-proto" ]; then
|
||||
mkdir -p $THIRD_PARTY_DIR
|
||||
|
||||
pushd $THIRD_PARTY_DIR
|
||||
|
||||
rm -rf milvus-proto
|
||||
|
||||
git clone -b $GIT_BRANCH https://github.com/milvus-io/milvus-proto.git
|
||||
|
||||
git clone https://github.com/milvus-io/milvus-proto.git
|
||||
cd milvus-proto
|
||||
API_VERSION=$(go list -m github.com/milvus-io/milvus-proto/go-api | awk -F' ' '{print $2}')
|
||||
COMMIT_ID=$(echo $API_VERSION | awk -F'-' '{print $3}')
|
||||
echo "version: $API_VERSION, commitID: $COMMIT_ID"
|
||||
if [ -z $COMMIT_ID ]; then
|
||||
git checkout -b $API_VERSION $API_VERSION
|
||||
else
|
||||
git reset --hard $COMMIT_ID
|
||||
fi
|
||||
popd
|
||||
fi
|
@ -14,3 +14,11 @@ 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
|
Loading…
Reference in New Issue
Block a user