release --pbuilder

This commit is contained in:
proller 2017-12-28 16:27:49 +03:00
parent 7a813002aa
commit e7856ebcbf

16
release
View File

@ -34,6 +34,9 @@ do
elif [[ $1 == '--head' ]]; then
REVISION=`git rev-parse HEAD`
shift
elif [[ $1 == '--pbuilder' ]]; then
USE_PBUILDER=1
shift
else
echo "Unknown option $1"
exit 2
@ -63,13 +66,22 @@ if [ -z "$THREAD_COUNT" ] ; then
fi
CMAKE_FLAGS+=" $LIBTCMALLOC_OPTS -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DUSE_EMBEDDED_COMPILER=1"
export CMAKE_FLAGS
REVISION+=$VERSION_POSTFIX
echo -e "\nCurrent revision is $REVISION"
gen_changelog "$REVISION" "" "$AUTHOR" ""
# Build (only binary packages).
debuild -e PATH -e SSH_AUTH_SOCK -e DEB_BUILD_OPTIONS=parallel=$THREAD_COUNT \
if [ -z "$USE_PBUILDER" ] ; then
# Build (only binary packages).
debuild -e PATH -e SSH_AUTH_SOCK -e DEB_BUILD_OPTIONS=parallel=$THREAD_COUNT \
-e DEB_CC=$DEB_CC -e DEB_CXX=$DEB_CXX -e CMAKE_FLAGS="$CMAKE_FLAGS" \
-b ${DEBUILD_NOSIGN_OPTIONS} ${DEBUILD_NODEPS_OPTIONS}
else
export DIST=artful
if [ -z "$NO_PBUILDER_CREATE" ] ; then
sudo --preserve-env pbuilder create --configfile debian/.pbuilderrc
fi
pdebuild --configfile debian/.pbuilderrc
fi