Exit early if EMAIL envvar is not defined
announce.sh supposes the EMAIL environment variable is set (since it calls release-notes without setting it. Exit early with an error message if it's not set. Change-Id: Ic9f00478dfeca69c4ecbe5fc126105c445c34c4e
This commit is contained in:
parent
9a0b6dfe22
commit
8ae2e1e84e
@ -134,7 +134,8 @@ announce.sh
|
||||
-----------
|
||||
|
||||
This script generates an email message ready to be sent to announce
|
||||
the release of a library or other tool.
|
||||
the release of a library or other tool. Note that the EMAIL environment
|
||||
variable needs to be set prior to running the tool.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -33,6 +33,11 @@ REPODIR=$1
|
||||
VERSION=$2
|
||||
SHORTNAME=`basename $REPODIR`
|
||||
|
||||
if [[ -z "$EMAIL" ]]; then
|
||||
echo "ERROR: The EMAIL environment variable is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$VIRTUAL_ENV" ]]; then
|
||||
(cd $TOOLSDIR && tox -e venv --notest)
|
||||
source $TOOLSDIR/.tox/venv/bin/activate
|
||||
|
Loading…
Reference in New Issue
Block a user