提交 89bc4293 编写于 作者: Y Yi Wang

Add environment variable WITH_DEB to control if buill.sh should generate .deb file

上级 2357aee3
...@@ -81,7 +81,7 @@ fi ...@@ -81,7 +81,7 @@ fi
# PaddlePaddle. This awkwardness is due to # PaddlePaddle. This awkwardness is due to
# https://github.com/PaddlePaddle/Paddle/issues/1854. It also # https://github.com/PaddlePaddle/Paddle/issues/1854. It also
# describes a solution. # describes a solution.
if [[ ${WITH_DOC} == "ON" ]]; then if [[ ${WITH_DOC:-OFF} == "ON" ]]; then
cat <<EOF cat <<EOF
======================================== ========================================
Building documentation ... Building documentation ...
...@@ -125,20 +125,23 @@ fi ...@@ -125,20 +125,23 @@ fi
# generate deb package for current build # generate deb package for current build
# FIXME(typhoonzero): should we remove paddle/scripts/deb ? # FIXME(typhoonzero): should we remove paddle/scripts/deb ?
cat <<EOF if [[ ${WITH_DEB:-OFF} == "ON" ]]; then
cat <<EOF
======================================== ========================================
Generating .deb package ... Generating .deb package ...
======================================== ========================================
EOF EOF
set +e set +e
cpack -D CPACK_GENERATOR='DEB' -j `nproc` .. cpack -D CPACK_GENERATOR='DEB' -j `nproc` ..
err_code=$? err_code=$?
if [ ${err_code} -ne 0 ]; then if [ ${err_code} -ne 0 ]; then
# cat error logs if cpack failed. # cat error logs if cpack failed.
cat /paddle/build/_CPack_Packages/Linux/DEB/PreinstallOutput.log cat /paddle/build/_CPack_Packages/Linux/DEB/PreinstallOutput.log
exit ${err_code} exit ${err_code}
fi
set -e
fi fi
set -e
cat <<EOF cat <<EOF
======================================== ========================================
Generate /paddle/build/Dockerfile ... Generate /paddle/build/Dockerfile ...
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册