提交 338d861f 编写于 作者: Y Yi Wang 提交者: GitHub

Merge pull request #3276 from wangkuiyi/make_generation_deb_optional

Add environment variable WITH_DEB to trigger the build of .deb file
...@@ -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.
先完成此消息的编辑!
想要评论请 注册