Default to removing build artifacts in b-a-d.sh

This commit is contained in:
Joshua Boniface 2021-10-11 16:41:00 -04:00
parent e9dea4d2d1
commit 04cad46305
1 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,18 @@ else
SUDO="sudo" SUDO="sudo"
fi fi
KEEP_ARTIFACTS=""
if [[ -n ${1} ]]; then
for arg in ${@}; do
case ${arg} in
-k|--keep)
KEEP_ARTIFACTS="y"
shift
;;
esac
done
fi
echo -n "> Linting code for errors... " echo -n "> Linting code for errors... "
./lint || exit ./lint || exit
@ -48,3 +60,6 @@ for HOST in ${HOSTS[@]}; do
sleep 30 sleep 30
echo "done." echo "done."
done done
if [[ -z ${KEEP_ARTIFACTS} ]]; then
rm ../pvc*_${version}*
fi