Fix announce email paths

Our announce email included a few errors in the paths provided. If the
git remote.origin.url ended with ".git" the tarball path was wrong. We
were also using the package name for git and doc paths incorrectly. This
fixes the name used so the resulting links are correct.

Story: #2005279
Task: #30131

Change-Id: I7a64761778b7391c0f3188b1177f03a7e712bd2a
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis
2019-03-25 11:20:13 -05:00
parent de44324d14
commit ba0843c051
2 changed files with 4 additions and 11 deletions

View File

@@ -49,7 +49,8 @@ fi
# of better information for the real repository name.
REMOTE_URL=$(cd $REPODIR && git config --get remote.origin.url || echo "")
if [ ! -z "$REMOTE_URL" ]; then
SHORTNAME=$(basename $REMOTE_URL)
# Make sure .git extensions are not included
SHORTNAME=$(basename $REMOTE_URL .git)
REPOORGNAME=$(basename $(dirname $REMOTE_URL))
else
# WARNING(dhellmann): This formulation only works in CI where the
@@ -159,13 +160,6 @@ if [[ $FIRST_FULL = "yes" ]]; then
stable=""
fi
# Set up email tags for the project owner.
PROJECT_OWNER=${PROJECT_OWNER:-$(get-repo-owner \
--email-tag $REPOORGNAME/$SHORTNAME || echo "")}
if [[ "$PROJECT_OWNER" != "" ]]; then
email_tags="--email-tags ${PROJECT_OWNER}"
fi
# Only include the PyPI link if we are told to.
INCLUDE_PYPI_LINK=$(get_tag_meta pypi)
if [[ "$INCLUDE_PYPI_LINK" == "yes" ]]; then
@@ -202,7 +196,6 @@ echo
echo "Generating email body in $relnotes_file"
release-notes \
--email \
$email_tags \
--series "$SERIES" \
$stable \
$first_release \