stop if announce.sh fails to build the virtualenv

If the announce script cannot set up the tools it needs it should not
continue.

Change-Id: If66a5f863976c5c2010ac7d5c2efdfed55ff58c1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-04-25 14:35:03 -04:00
parent 4a1c52a1ee
commit 8a69cd398a
1 changed files with 4 additions and 1 deletions

View File

@ -62,7 +62,10 @@ fi
export EMAIL=${EMAIL:-no-reply@openstack.org}
if [[ -z "$VIRTUAL_ENV" ]]; then
(cd $TOOLSDIR && tox -e venv --notest)
if ! (cd $TOOLSDIR && tox -e venv --notest); then
echo "Failed to build virtualenv"
exit 1
fi
source $TOOLSDIR/.tox/venv/bin/activate
fi