diff --git a/announce.sh b/announce.sh index 3557e36..89412ef 100755 --- a/announce.sh +++ b/announce.sh @@ -163,8 +163,9 @@ echo "$DIFF_START to $VERSION on $SERIES" relnotes_file="$RELNOTESDIR/$SHORTNAME-$VERSION" -# If we don't have a setup.py use the current directory name as the library -# name so the email template makes sense. +# If we don't have a setup.py, use a CI system environment variable or the +# current directory name as the library name so the email template makes +# sense. if [ -e setup.py ] ; then # Some projects have setup_requires dependencies on packages that are # not pre-installed, so run a setuptools command in a way to get them @@ -174,7 +175,13 @@ if [ -e setup.py ] ; then python setup.py --name library_name=$(python setup.py --name) description="$(python setup.py --description)" +elif [ -n "$ZUUL_PROJECT" ] ; then + # We may be running in the context of a Zuul CI system, in which case + # we can infer the project name from the repo name it supplies. + library_name="$(basename ${ZUUL_PROJECT})" else + # As a last resort, guess that the project name may be the same as that + # of the local working directory at the point this script is invoked. library_name="$(basename $(pwd))" fi