Support the `RELEASE` param to update the milvus/api version dynamically (#19656)

Signed-off-by: SimFG <bang.fu@zilliz.com>

Signed-off-by: SimFG <bang.fu@zilliz.com>
pull/19632/head
SimFG 2022-10-09 14:28:59 +08:00 committed by GitHub
parent 746e9ece5a
commit a85e44d169
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -97,6 +97,10 @@ print-build-info:
@echo "Go Version: $(GO_VERSION)"
milvus: build-cpp print-build-info
ifeq ($(RELEASE), TRUE)
@echo "Update milvus/api version ..."
@(env bash $(PWD)/scripts/update_api_version.sh)
endif
@echo "Building Milvus ..."
@source $(PWD)/scripts/setenv.sh && \
mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && \

16
scripts/update_api_version.sh Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
function line()
{
echo "----------------------------"
}
line
echo "Get the latest commitID"
commitID=`git rev-parse --short HEAD`
echo $commitID
line
echo "Update the milvus/api version"
go mod edit -dropreplace=github.com/milvus-io/milvus/api
go get github.com/milvus-io/milvus/api@$commitID