From ba0843c0513cbe3460bd867f78d0c6a7d8665044 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Mon, 25 Mar 2019 11:20:13 -0500 Subject: [PATCH] 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 --- openstack_releases/release_notes.py | 4 ++-- tools/announce.sh | 11 ++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/openstack_releases/release_notes.py b/openstack_releases/release_notes.py index faae3a5c29..3f727fa532 100644 --- a/openstack_releases/release_notes.py +++ b/openstack_releases/release_notes.py @@ -164,11 +164,11 @@ encouraged to test and validate this tarball! Alternatively, you can directly test the stable/{{series|lower}} release branch at: - https://git.openstack.org/cgit/openstack/{{project}}/log/?h=stable/{{series|lower}} + https://git.openstack.org/cgit/openstack/{{publishing_dir_name}}/log/?h=stable/{{series|lower}} Release notes for {{project}} can be found at: - https://docs.openstack.org/releasenotes/{{project}}/ + https://docs.openstack.org/releasenotes/{{publishing_dir_name}}/ {% if bug_url -%} If you find an issue that could be considered release-critical, please diff --git a/tools/announce.sh b/tools/announce.sh index 7b005ac396..969842f04b 100755 --- a/tools/announce.sh +++ b/tools/announce.sh @@ -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 \