From 875277e8c35fe4ea840ee97384a5072f622f2fa0 Mon Sep 17 00:00:00 2001 From: Kaipeng Deng Date: Fri, 21 May 2021 10:31:03 +0800 Subject: [PATCH] polish version log in build_wheel.sh (#3095) --- scripts/build_wheel.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/build_wheel.sh b/scripts/build_wheel.sh index d3505869b..6fa9c0b20 100644 --- a/scripts/build_wheel.sh +++ b/scripts/build_wheel.sh @@ -133,11 +133,23 @@ build_and_install unittest cleanup +# get Paddle version PADDLE_VERSION=`python -c "import paddle; print(paddle.version.full_version)"` PADDLE_COMMIT=`python -c "import paddle; print(paddle.version.commit)"` +PADDLE_COMMIT=`git rev-parse --short $PADDLE_COMMIT` + +# get PaddleDetection branch +PPDET_BRANCH=`git rev-parse --abbrev-ref HEAD` +PPDET_COMMIT=`git rev-parse --short HEAD` + +# get Python version +PYTHON_VERSION=`python -c "import platform; print(platform.python_version())"` + echo -e "\n${GREEN}paddledet wheel compiled and checked success !${NONE} - ${BLUE}paddle version:${NONE} $PADDLE_VERSION - ${BLUE}paddle commit:${NONE} $PADDLE_COMMIT\n" + ${BLUE}Python version:${NONE} $PYTHON_VERSION + ${BLUE}Paddle version:${NONE} $PADDLE_VERSION ($PADDLE_COMMIT) + ${BLUE}PaddleDetection branch:${NONE} $PPDET_BRANCH ($PPDET_COMMIT)\n" + echo -e "${GREEN}wheel saved under${NONE} ${RED}${BOLD}./dist" trap : 0 -- GitLab