diff --git a/announce.sh b/announce.sh index e92f24c..4da94df 100755 --- a/announce.sh +++ b/announce.sh @@ -176,6 +176,7 @@ release-notes \ --series "$SERIES" \ $stable \ $first_release \ + --tarball-dir-name "$SHORTNAME" \ . "$library_name" "$DIFF_START" "$VERSION" \ $include_pypi_link \ --description "$description" \ diff --git a/releasetools/cmds/release_notes.py b/releasetools/cmds/release_notes.py index 1f16981..72622ce 100644 --- a/releasetools/cmds/release_notes.py +++ b/releasetools/cmds/release_notes.py @@ -74,6 +74,11 @@ def main(): help=('A brief description for the library being ' 'released'), ) + parser.add_argument('--tarball-dir-name', + action='store', + help=('The directory on tarballs.openstack.org ' + 'containing the package'), + ) email_group = parser.add_argument_group('email settings') email_group.add_argument( @@ -118,6 +123,7 @@ def main(): first_release=args.first_release, library_name=args.library_name, description=args.description, + tarball_dir_name=args.tarball_dir_name or args.library_name, ) print(notes.encode('utf-8')) return 0 diff --git a/releasetools/release_notes.py b/releasetools/release_notes.py index 1303cd4..d0562b7 100644 --- a/releasetools/release_notes.py +++ b/releasetools/release_notes.py @@ -101,7 +101,7 @@ Download the package from: {% if pypi_url %} {{ pypi_url }} {% else %} - https://tarballs.openstack.org/{{project}}/ + https://tarballs.openstack.org/{{tarball_dir_name}}/ {% endif %} {% if bug_url %} @@ -156,7 +156,7 @@ Hello everyone, A new release candidate for {{project}} for the end of the {{series|capitalize}} cycle is available! You can find the source code tarball at: - https://tarballs.openstack.org/{{project}}/ + https://tarballs.openstack.org/{{tarball_dir_name}}/ Unless release-critical issues are found that warrant a release candidate respin, this candidate will be formally released as the @@ -252,7 +252,8 @@ def generate_release_notes(library, library_path, include_pypi_link, changes_only, first_release, - library_name, description + library_name, description, + tarball_dir_name, ): """Return the text of the release notes. @@ -281,6 +282,8 @@ def generate_release_notes(library, library_path, release of the project :param library_name: Name of the library :param description: Description of the library + :param tarball_dir_name: The directory on tarballs.openstack.org + containing the package. """ # Determine if this is a release candidate or not. @@ -389,6 +392,7 @@ def generate_release_notes(library, library_path, 'email_tags': email_tags, 'reno_notes': reno_notes, 'first_release': first_release, + 'tarball_dir_name': tarball_dir_name, }) if include_pypi_link: params['pypi_url'] = PYPI_URL_TPL % library_name