From 746ecb544a25aa5f1373e74b64f3127d5cd07911 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 13 Feb 2024 13:27:16 +0100 Subject: [PATCH] Bump antsibull-changelog, and output MarkDown version next to RST version of changelog. --- MANIFEST.in | 1 + changelogs/README.md | 4 ++-- changelogs/config.yaml | 3 +++ packaging/release.py | 4 ++-- test/sanity/code-smell/package-data.py | 10 +++++++--- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index bf7a6a047e2..7591037eab7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include COPYING include bin/* +include changelogs/CHANGELOG*.md include changelogs/CHANGELOG*.rst include changelogs/changelog.yaml include licenses/*.txt diff --git a/changelogs/README.md b/changelogs/README.md index 5cc58a17d33..7e71c5624c1 100644 --- a/changelogs/README.md +++ b/changelogs/README.md @@ -1,8 +1,8 @@ Changelogs ========== -As part of the release process a version-specific `CHANGELOG-vX.Y.rst` will be generated from fragments in -the `fragments` directory. +As part of the release process a version-specific `CHANGELOG-vX.Y.rst` and `CHANGELOG-vX.Y.md` will be generated from +fragments in the `fragments` directory. On release branches once a release has been created, consult the branch's version-specific file for changes that have occurred in that branch. The `devel` branch does not have a generated changelog, only changelog fragments. diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 3a55d900176..7fa013e1f13 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -11,6 +11,9 @@ mention_ancestor: false notesdir: fragments prelude_section_name: release_summary new_plugins_after_name: removed_features +output_formats: +- md +- rst sections: - ['major_changes', 'Major Changes'] - ['minor_changes', 'Minor Changes'] diff --git a/packaging/release.py b/packaging/release.py index 97c58a74248..c4017833f10 100755 --- a/packaging/release.py +++ b/packaging/release.py @@ -973,7 +973,7 @@ def create_github_release_notes(upstream: Remote, repository: str, version: Vers variables = dict( version=version, releases=get_release_artifact_details(repository, version, validate), - changelog=f"https://github.com/{upstream.user}/{upstream.repo}/blob/v{version}/changelogs/CHANGELOG-v{version.major}.{version.minor}.rst", + changelog=f"https://github.com/{upstream.user}/{upstream.repo}/blob/v{version}/changelogs/CHANGELOG-v{version.major}.{version.minor}.md", ) release_notes = template.render(**variables).strip() @@ -1094,7 +1094,7 @@ This release is a maintenance release containing numerous bugfixes. {% endif %} The full changelog can be found here: -https://github.com/{{ upstream.user }}/{{ upstream.repo }}/blob/v{{ version }}/changelogs/CHANGELOG-v{{ info.short }}.rst +https://github.com/{{ upstream.user }}/{{ upstream.repo }}/blob/v{{ version }}/changelogs/CHANGELOG-v{{ info.short }}.md Schedule for future releases diff --git a/test/sanity/code-smell/package-data.py b/test/sanity/code-smell/package-data.py index 7a81b7597a9..ecf5e6235ab 100644 --- a/test/sanity/code-smell/package-data.py +++ b/test/sanity/code-smell/package-data.py @@ -161,9 +161,13 @@ def main() -> None: # Make sure a changelog exists for this version when testing from devel. # When testing from a stable branch the changelog will already exist. major_minor_version = '.'.join(__version__.split('.')[:2]) - changelog_path = f'changelogs/CHANGELOG-v{major_minor_version}.rst' - pathlib.Path(clean_repo_dir, changelog_path).touch() - complete_file_list.append(changelog_path) + changelog_paths = [ + f'changelogs/CHANGELOG-v{major_minor_version}.rst', + f'changelogs/CHANGELOG-v{major_minor_version}.md', + ] + for changelog_path in changelog_paths: + pathlib.Path(clean_repo_dir, changelog_path).touch() + complete_file_list.append(changelog_path) expected_sdist_files = collect_sdist_files(complete_file_list) expected_wheel_files = collect_wheel_files(complete_file_list)