enhance: get environment variable from .env (#34081)

Signed-off-by: Liang Huang <sammy.huang@zilliz.com>
This commit is contained in:
sammy.huang 2024-06-23 09:34:07 +08:00 committed by GitHub
parent e1b64e2318
commit b77ab76d74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,6 +23,11 @@ set -x
# Absolute path to the toplevel milvus directory.
toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")
if [[ -f "$toplevel/.env" ]]; then
set -a # automatically export all variables from .env
source $toplevel/.env
set +a # stop automatically exporting
fi
OS_NAME="${OS_NAME:-ubuntu20.04}"
MILVUS_IMAGE_REPO="${MILVUS_IMAGE_REPO:-milvusdb/milvus}"