Commit 7c006f45 authored by Neil Williams's avatar Neil Williams 💬 Committed by Steve Mcintyre

Ensure build dir exists

Pass directory in the gbp options.
Support standard clean operation before checking for
modified files.
Signed-off-by: Neil Williams's avatarNeil Williams <neil.williams@linaro.org>
parent 0e598e63
Pipeline #809 passed with stages
in 12 minutes and 11 seconds
......@@ -108,6 +108,7 @@ override_dh_auto_clean:
find . -type d -name '__pycache__' -empty -delete
$(RM) -r dist/ jquery.cookie.js
$(RM) debian/*.service
$(RM) common-requirements.txt dispatcher-requirements.txt server-requirements.txt
[ ! -f doc/Makefile ] || make -C doc/ clean
[ ! -f doc/v1/Makefile ] || make -C doc/v1/ clean
[ ! -f doc/v2/Makefile ] || make -C doc/v2/ clean
......
......@@ -32,7 +32,6 @@ while getopts ":a:o:s:B" opt; do
;;
o)
DIR=`readlink -f $OPTARG`
GBP_OPTS+=" --git-export-dir=${DIR}"
;;
\?)
echo "[LAVA-DEV] Invalid option: -$OPTARG" >&2
......@@ -54,6 +53,11 @@ done
# change to a native build.
DEBUILD_OPTS=" --no-lintian -uc -us ${DEBUILD_OPTS}"
if [ ! -d ${DIR} ]; then
mkdir ${DIR}
fi
GBP_OPTS+=" --git-export-dir=${DIR}"
# store the current branch name
BRANCH=`git branch | grep \* | cut -d ' ' -f2`
......@@ -75,6 +79,8 @@ if [ ! -x /usr/bin/gbp ]; then
exit 2
fi
dpkg-checkbuilddeps
fakeroot debian/rules clean
LOCAL=`git ls-files -m -o --exclude-standard|wc -l`
if [ ${LOCAL} != 0 ]; then
echo "[LAVA-DEV] You have uncommitted changes in your source tree:"
......@@ -82,8 +88,6 @@ if [ ${LOCAL} != 0 ]; then
exit 3
fi
dpkg-checkbuilddeps
# only trap here to avoid branch changes without a branch
trap finish EXIT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment