python-semantic-release 9.12.0__tar.gz → 9.12.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_semantic_release-9.12.0/python_semantic_release.egg-info → python_semantic_release-9.12.1}/PKG-INFO +6 -5
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/automatic-releases/github-actions.rst +5 -5
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/changelog_templates.rst +7 -7
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/pyproject.toml +12 -5
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1/python_semantic_release.egg-info}/PKG-INFO +6 -5
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/SOURCES.txt +52 -41
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/requires.txt +5 -4
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/__init__.py +1 -1
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/changelog/context.py +1 -1
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/changelog_writer.py +12 -4
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/commands/version.py +0 -11
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/const.py +1 -1
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/commit_parser/angular.py +62 -38
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/md/.changelog_init.md.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +3 -3
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/md/.changelog_update.md.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2 +3 -3
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/md/.unreleased_changes.md.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2 +1 -1
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/md/.versioned_changes.md.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2 +1 -1
- python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.release_notes.md.j2 +1 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/data/templates/angular/md/CHANGELOG.md.j2 +2 -2
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/rst/.changelog_init.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +3 -3
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/rst/.changelog_update.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2 +3 -3
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/rst/.changes.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/changes.rst.j2 +1 -1
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/rst/.unreleased_changes.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2 +1 -1
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/rst/.versioned_changes.rst.j2 → python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2 +2 -2
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2 +2 -2
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/conftest.py +83 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/const.py +39 -52
- {python_semantic_release-9.12.0/tests/command_line → python_semantic_release-9.12.1/tests/e2e/cmd_changelog}/test_changelog.py +103 -93
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version.py +275 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_build.py +395 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_bump.py +3571 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_changelog.py +519 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_github_actions.py +45 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_print.py +531 -0
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_release_notes.py +78 -0
- {python_semantic_release-9.12.0/tests/scenario → python_semantic_release-9.12.1/tests/e2e/cmd_version}/test_version_stamp.py +137 -46
- python_semantic_release-9.12.1/tests/e2e/cmd_version/test_version_strict.py +117 -0
- {python_semantic_release-9.12.0/tests/command_line → python_semantic_release-9.12.1/tests/e2e}/conftest.py +9 -0
- python_semantic_release-9.12.1/tests/fixtures/commit_parsers.py +85 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/example_project.py +32 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/git_repo.py +25 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/__init__.py +1 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +260 -36
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +376 -67
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +5 -0
- python_semantic_release-9.12.1/tests/fixtures/repos/repo_initial_commit.py +181 -0
- python_semantic_release-9.12.1/tests/unit/conftest.py +14 -0
- {python_semantic_release-9.12.0/tests/scenario → python_semantic_release-9.12.1/tests/unit/semantic_release/changelog}/test_release_history.py +87 -66
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/changelog/test_release_notes.py +1 -2
- python_semantic_release-9.12.1/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- python_semantic_release-9.12.1/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- python_semantic_release-9.12.1/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/util.py +8 -0
- python_semantic_release-9.12.0/semantic_release/data/templates/angular/release_notes.md.j2 +0 -1
- python_semantic_release-9.12.0/tests/command_line/test_version.py +0 -1855
- python_semantic_release-9.12.0/tests/fixtures/commit_parsers.py +0 -34
- python_semantic_release-9.12.0/tests/scenario/test_next_version.py +0 -2018
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/AUTHORS.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/LICENSE +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/MANIFEST.in +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/README.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/Makefile +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/algorithm.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/automatic-releases/cronjobs.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/automatic-releases/index.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/automatic-releases/travis.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/commands.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/commit-parsing.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/conf.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/configuration.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/contributing.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/contributors.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/index.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/make.bat +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/migrating_from_v7.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/multibranch_releases.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/strict_mode.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/troubleshooting.rst +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/dependency_links.txt +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/entry_points.txt +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/python_semantic_release.egg-info/top_level.txt +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/__main__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/changelog/release_history.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/changelog/template.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/cli_context.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/commands/changelog.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/commands/main.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/commands/publish.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/config.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/github_actions_output.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/masking_filter.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/cli/util.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/commit_parser/emoji.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/commit_parser/scipy.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/commit_parser/tag.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/const.py +0 -0
- /python_semantic_release-9.12.0/semantic_release/data/templates/angular/md/.changelog_header.md.j2 → /python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/changelog_header.md.j2 +0 -0
- /python_semantic_release-9.12.0/semantic_release/data/templates/angular/md/.changes.md.j2 → /python_semantic_release-9.12.1/semantic_release/data/templates/angular/md/.components/changes.md.j2 +0 -0
- /python_semantic_release-9.12.0/semantic_release/data/templates/angular/rst/.changelog_header.rst.j2 → /python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2 +0 -0
- /python_semantic_release-9.12.0/semantic_release/data/templates/angular/rst/.macros.rst.j2 → /python_semantic_release-9.12.1/semantic_release/data/templates/angular/rst/.components/macros.rst.j2 +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/enums.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/errors.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/gitproject.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/helpers.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/_base.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/bitbucket.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/gitea.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/github.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/gitlab.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/remote_hvcs_base.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/hvcs/util.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/version/algorithm.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/version/declaration.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/version/translator.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/semantic_release/version/version.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/setup.cfg +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/__init__.py +0 -0
- {python_semantic_release-9.12.0/tests/command_line → python_semantic_release-9.12.1/tests/e2e}/__init__.py +0 -0
- {python_semantic_release-9.12.0/tests/scenario → python_semantic_release-9.12.1/tests/e2e/cmd_changelog}/__init__.py +0 -0
- {python_semantic_release-9.12.0/tests/unit → python_semantic_release-9.12.1/tests/e2e/cmd_config}/__init__.py +0 -0
- {python_semantic_release-9.12.0/tests/command_line → python_semantic_release-9.12.1/tests/e2e/cmd_config}/test_generate_config.py +0 -0
- {python_semantic_release-9.12.0/tests/unit/semantic_release → python_semantic_release-9.12.1/tests/e2e/cmd_publish}/__init__.py +0 -0
- {python_semantic_release-9.12.0/tests/command_line → python_semantic_release-9.12.1/tests/e2e/cmd_publish}/test_publish.py +0 -0
- {python_semantic_release-9.12.0/tests/unit/semantic_release/changelog → python_semantic_release-9.12.1/tests/e2e/cmd_version}/__init__.py +0 -0
- {python_semantic_release-9.12.0/tests/command_line → python_semantic_release-9.12.1/tests/e2e}/test_help.py +0 -0
- {python_semantic_release-9.12.0/tests/command_line → python_semantic_release-9.12.1/tests/e2e}/test_main.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/github_flow/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/fixtures/scipy.py +0 -0
- {python_semantic_release-9.12.0/tests/unit/semantic_release/cli → python_semantic_release-9.12.1/tests/unit}/__init__.py +0 -0
- {python_semantic_release-9.12.0/tests/unit/semantic_release/commit_parser → python_semantic_release-9.12.1/tests/unit/semantic_release}/__init__.py +0 -0
- {python_semantic_release-9.12.0/tests/unit/semantic_release/hvcs → python_semantic_release-9.12.1/tests/unit/semantic_release/changelog}/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-9.12.0/tests/scenario → python_semantic_release-9.12.1/tests/unit/semantic_release/changelog}/test_template_render.py +0 -0
- {python_semantic_release-9.12.0/tests/unit/semantic_release/version → python_semantic_release-9.12.1/tests/unit/semantic_release/cli}/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_config.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_util.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/cli/test_version.py +0 -0
- /python_semantic_release-9.12.0/tests/unit/semantic_release/hvcs/test_util.py → /python_semantic_release-9.12.1/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/version/test_declaration.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/tests/unit/semantic_release/version/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 9.12.
|
|
3
|
+
Version: 9.12.1
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -43,13 +43,14 @@ Provides-Extra: test
|
|
|
43
43
|
Requires-Dist: coverage[toml]~=7.0; extra == "test"
|
|
44
44
|
Requires-Dist: pyyaml~=6.0; extra == "test"
|
|
45
45
|
Requires-Dist: pytest~=8.3; extra == "test"
|
|
46
|
+
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
47
|
+
Requires-Dist: pytest-cov~=5.0; extra == "test"
|
|
46
48
|
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
47
|
-
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
48
|
-
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
49
49
|
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
50
|
-
Requires-Dist: pytest-
|
|
50
|
+
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
51
|
+
Requires-Dist: pytest-order~=1.3; extra == "test"
|
|
51
52
|
Requires-Dist: pytest-pretty~=1.2; extra == "test"
|
|
52
|
-
Requires-Dist: pytest-
|
|
53
|
+
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
53
54
|
Requires-Dist: responses~=0.25.0; extra == "test"
|
|
54
55
|
Requires-Dist: requests-mock~=1.10; extra == "test"
|
|
55
56
|
Provides-Extra: dev
|
|
@@ -337,7 +337,7 @@ before the :ref:`version <cmd-version>` subcommand.
|
|
|
337
337
|
|
|
338
338
|
.. code:: yaml
|
|
339
339
|
|
|
340
|
-
- uses: python-semantic-release/python-semantic-release@v9.12.
|
|
340
|
+
- uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
341
341
|
with:
|
|
342
342
|
root_options: "-vv --noop"
|
|
343
343
|
|
|
@@ -684,7 +684,7 @@ to the GitHub Release Assets as well.
|
|
|
684
684
|
- name: Action | Semantic Version Release
|
|
685
685
|
id: release
|
|
686
686
|
# Adjust tag with desired version if applicable.
|
|
687
|
-
uses: python-semantic-release/python-semantic-release@v9.12.
|
|
687
|
+
uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
688
688
|
with:
|
|
689
689
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
690
690
|
git_committer_name: "github-actions"
|
|
@@ -744,7 +744,7 @@ The equivalent GitHub Action configuration would be:
|
|
|
744
744
|
|
|
745
745
|
- name: Action | Semantic Version Release
|
|
746
746
|
# Adjust tag with desired version if applicable.
|
|
747
|
-
uses: python-semantic-release/python-semantic-release@v9.12.
|
|
747
|
+
uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
748
748
|
with:
|
|
749
749
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
750
750
|
force: patch
|
|
@@ -772,13 +772,13 @@ Publish Action.
|
|
|
772
772
|
.. code:: yaml
|
|
773
773
|
|
|
774
774
|
- name: Release Project 1
|
|
775
|
-
uses: python-semantic-release/python-semantic-release@v9.12.
|
|
775
|
+
uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
776
776
|
with:
|
|
777
777
|
directory: ./project1
|
|
778
778
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
779
779
|
|
|
780
780
|
- name: Release Project 2
|
|
781
|
-
uses: python-semantic-release/python-semantic-release@v9.12.
|
|
781
|
+
uses: python-semantic-release/python-semantic-release@v9.12.1
|
|
782
782
|
with:
|
|
783
783
|
directory: ./project2
|
|
784
784
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
{python_semantic_release-9.12.0 → python_semantic_release-9.12.1}/docs/changelog_templates.rst
RENAMED
|
@@ -863,7 +863,7 @@ the template directory structure and modularity is maintained.
|
|
|
863
863
|
.. tip::
|
|
864
864
|
When initially starting out at customizing your own release notes template, you
|
|
865
865
|
should reference the default template embedded within PSR. The release notes template
|
|
866
|
-
can be found in the directory ``data/templates/<parser
|
|
866
|
+
can be found in the directory ``data/templates/<parser>/md`` within the PSR package.
|
|
867
867
|
|
|
868
868
|
|
|
869
869
|
.. _changelog-templates-custom_release_notes-context:
|
|
@@ -1018,29 +1018,29 @@ __ https://github.com/python-semantic-release/python-semantic-release/tree/maste
|
|
|
1018
1018
|
2. **Use the new read_file filter** to read in the existing changelog file
|
|
1019
1019
|
``ctx.prev_changelog_file``. This will allow you to include the existing
|
|
1020
1020
|
changelog content in your new changelog file. See
|
|
1021
|
-
``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1021
|
+
``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1022
1022
|
|
|
1023
1023
|
3. **Split the changelog content based on the insertion flag.** This will
|
|
1024
1024
|
allow you to insert the new release information after the insertion flag
|
|
1025
1025
|
(``ctx.changelog_insertion_flag``). See
|
|
1026
|
-
``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1026
|
+
``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1027
1027
|
|
|
1028
1028
|
4. **Print the leading content before the insertion flag.** This ensures you
|
|
1029
1029
|
maintain any content that should be included before the new release information.
|
|
1030
|
-
See ``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1030
|
+
See ``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1031
1031
|
|
|
1032
1032
|
5. **Print your insertion flag.** This is impartive to ensure that the resulting
|
|
1033
1033
|
changelog can be updated in the future. See
|
|
1034
|
-
``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1034
|
+
``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1035
1035
|
|
|
1036
1036
|
6. **Print the new release information.** Be sure to consider both unreleased
|
|
1037
1037
|
and released commits during this step because of the :ref:`cmd-changelog`
|
|
1038
1038
|
command that can be run at any time. See
|
|
1039
|
-
``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1039
|
+
``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1040
1040
|
|
|
1041
1041
|
7. **Print the trailing content after the insertion flag.** This ensures you
|
|
1042
1042
|
maintain any content that should be included after the new release information.
|
|
1043
|
-
See ``data/templates/*/md/.changelog_update.md.j2`` for reference.
|
|
1043
|
+
See ``data/templates/*/md/.components/changelog_update.md.j2`` for reference.
|
|
1044
1044
|
|
|
1045
1045
|
|
|
1046
1046
|
.. tip::
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "python-semantic-release"
|
|
9
|
-
version = "9.12.
|
|
9
|
+
version = "9.12.1"
|
|
10
10
|
description = "Automatic Semantic Versioning for Python projects"
|
|
11
11
|
requires-python = ">=3.8"
|
|
12
12
|
license = { text = "MIT" }
|
|
@@ -61,13 +61,14 @@ test = [
|
|
|
61
61
|
"coverage[toml] ~= 7.0",
|
|
62
62
|
"pyyaml ~= 6.0",
|
|
63
63
|
"pytest ~= 8.3",
|
|
64
|
+
"pytest-clarity ~= 1.0",
|
|
65
|
+
"pytest-cov ~= 5.0",
|
|
64
66
|
"pytest-env ~= 1.0",
|
|
65
|
-
"pytest-xdist ~= 3.0",
|
|
66
|
-
"pytest-mock ~= 3.0",
|
|
67
67
|
"pytest-lazy-fixtures ~= 1.1.1",
|
|
68
|
-
"pytest-
|
|
68
|
+
"pytest-mock ~= 3.0",
|
|
69
|
+
"pytest-order ~= 1.3",
|
|
69
70
|
"pytest-pretty ~= 1.2",
|
|
70
|
-
"pytest-
|
|
71
|
+
"pytest-xdist ~= 3.0",
|
|
71
72
|
"responses ~= 0.25.0",
|
|
72
73
|
"requests-mock ~= 1.10",
|
|
73
74
|
]
|
|
@@ -97,6 +98,7 @@ addopts = [
|
|
|
97
98
|
"-ra",
|
|
98
99
|
"--diff-symbols",
|
|
99
100
|
"--cache-clear",
|
|
101
|
+
"--durations=20",
|
|
100
102
|
# No default coverage - causes problems with debuggers
|
|
101
103
|
# "--cov=semantic_release",
|
|
102
104
|
# "--cov-context=test",
|
|
@@ -106,6 +108,11 @@ addopts = [
|
|
|
106
108
|
testpaths = [
|
|
107
109
|
"tests"
|
|
108
110
|
]
|
|
111
|
+
markers = [
|
|
112
|
+
"unit: mark a test as a unit test",
|
|
113
|
+
"e2e: mark a test as a end-to-end test",
|
|
114
|
+
"comprehensive: mark a test as a comprehensive (multiple variations) test",
|
|
115
|
+
]
|
|
109
116
|
|
|
110
117
|
[tool.coverage.html]
|
|
111
118
|
show_contexts = true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 9.12.
|
|
3
|
+
Version: 9.12.1
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -43,13 +43,14 @@ Provides-Extra: test
|
|
|
43
43
|
Requires-Dist: coverage[toml]~=7.0; extra == "test"
|
|
44
44
|
Requires-Dist: pyyaml~=6.0; extra == "test"
|
|
45
45
|
Requires-Dist: pytest~=8.3; extra == "test"
|
|
46
|
+
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
47
|
+
Requires-Dist: pytest-cov~=5.0; extra == "test"
|
|
46
48
|
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
47
|
-
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
48
|
-
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
49
49
|
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
50
|
-
Requires-Dist: pytest-
|
|
50
|
+
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
51
|
+
Requires-Dist: pytest-order~=1.3; extra == "test"
|
|
51
52
|
Requires-Dist: pytest-pretty~=1.2; extra == "test"
|
|
52
|
-
Requires-Dist: pytest-
|
|
53
|
+
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
53
54
|
Requires-Dist: responses~=0.25.0; extra == "test"
|
|
54
55
|
Requires-Dist: requests-mock~=1.10; extra == "test"
|
|
55
56
|
Provides-Extra: dev
|
|
@@ -3,22 +3,22 @@ LICENSE
|
|
|
3
3
|
MANIFEST.in
|
|
4
4
|
README.rst
|
|
5
5
|
pyproject.toml
|
|
6
|
-
./semantic_release/data/templates/angular/release_notes.md.j2
|
|
7
|
-
./semantic_release/data/templates/angular/md/.changelog_header.md.j2
|
|
8
|
-
./semantic_release/data/templates/angular/md/.changelog_init.md.j2
|
|
9
|
-
./semantic_release/data/templates/angular/md/.changelog_update.md.j2
|
|
10
|
-
./semantic_release/data/templates/angular/md/.changes.md.j2
|
|
11
|
-
./semantic_release/data/templates/angular/md/.unreleased_changes.md.j2
|
|
12
|
-
./semantic_release/data/templates/angular/md/.versioned_changes.md.j2
|
|
6
|
+
./semantic_release/data/templates/angular/md/.release_notes.md.j2
|
|
13
7
|
./semantic_release/data/templates/angular/md/CHANGELOG.md.j2
|
|
14
|
-
./semantic_release/data/templates/angular/
|
|
15
|
-
./semantic_release/data/templates/angular/
|
|
16
|
-
./semantic_release/data/templates/angular/
|
|
17
|
-
./semantic_release/data/templates/angular/
|
|
18
|
-
./semantic_release/data/templates/angular/
|
|
19
|
-
./semantic_release/data/templates/angular/
|
|
20
|
-
./semantic_release/data/templates/angular/rst/.versioned_changes.rst.j2
|
|
8
|
+
./semantic_release/data/templates/angular/md/.components/changelog_header.md.j2
|
|
9
|
+
./semantic_release/data/templates/angular/md/.components/changelog_init.md.j2
|
|
10
|
+
./semantic_release/data/templates/angular/md/.components/changelog_update.md.j2
|
|
11
|
+
./semantic_release/data/templates/angular/md/.components/changes.md.j2
|
|
12
|
+
./semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2
|
|
13
|
+
./semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2
|
|
21
14
|
./semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2
|
|
15
|
+
./semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2
|
|
16
|
+
./semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2
|
|
17
|
+
./semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2
|
|
18
|
+
./semantic_release/data/templates/angular/rst/.components/changes.rst.j2
|
|
19
|
+
./semantic_release/data/templates/angular/rst/.components/macros.rst.j2
|
|
20
|
+
./semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2
|
|
21
|
+
./semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2
|
|
22
22
|
docs/Makefile
|
|
23
23
|
docs/algorithm.rst
|
|
24
24
|
docs/changelog_templates.rst
|
|
@@ -77,22 +77,22 @@ semantic_release/commit_parser/scipy.py
|
|
|
77
77
|
semantic_release/commit_parser/tag.py
|
|
78
78
|
semantic_release/commit_parser/token.py
|
|
79
79
|
semantic_release/commit_parser/util.py
|
|
80
|
-
semantic_release/data/templates/angular/release_notes.md.j2
|
|
81
|
-
semantic_release/data/templates/angular/md/.changelog_header.md.j2
|
|
82
|
-
semantic_release/data/templates/angular/md/.changelog_init.md.j2
|
|
83
|
-
semantic_release/data/templates/angular/md/.changelog_update.md.j2
|
|
84
|
-
semantic_release/data/templates/angular/md/.changes.md.j2
|
|
85
|
-
semantic_release/data/templates/angular/md/.unreleased_changes.md.j2
|
|
86
|
-
semantic_release/data/templates/angular/md/.versioned_changes.md.j2
|
|
80
|
+
semantic_release/data/templates/angular/md/.release_notes.md.j2
|
|
87
81
|
semantic_release/data/templates/angular/md/CHANGELOG.md.j2
|
|
88
|
-
semantic_release/data/templates/angular/
|
|
89
|
-
semantic_release/data/templates/angular/
|
|
90
|
-
semantic_release/data/templates/angular/
|
|
91
|
-
semantic_release/data/templates/angular/
|
|
92
|
-
semantic_release/data/templates/angular/
|
|
93
|
-
semantic_release/data/templates/angular/
|
|
94
|
-
semantic_release/data/templates/angular/rst/.versioned_changes.rst.j2
|
|
82
|
+
semantic_release/data/templates/angular/md/.components/changelog_header.md.j2
|
|
83
|
+
semantic_release/data/templates/angular/md/.components/changelog_init.md.j2
|
|
84
|
+
semantic_release/data/templates/angular/md/.components/changelog_update.md.j2
|
|
85
|
+
semantic_release/data/templates/angular/md/.components/changes.md.j2
|
|
86
|
+
semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2
|
|
87
|
+
semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2
|
|
95
88
|
semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2
|
|
89
|
+
semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2
|
|
90
|
+
semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2
|
|
91
|
+
semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2
|
|
92
|
+
semantic_release/data/templates/angular/rst/.components/changes.rst.j2
|
|
93
|
+
semantic_release/data/templates/angular/rst/.components/macros.rst.j2
|
|
94
|
+
semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2
|
|
95
|
+
semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2
|
|
96
96
|
semantic_release/hvcs/__init__.py
|
|
97
97
|
semantic_release/hvcs/_base.py
|
|
98
98
|
semantic_release/hvcs/bitbucket.py
|
|
@@ -111,20 +111,33 @@ tests/__init__.py
|
|
|
111
111
|
tests/conftest.py
|
|
112
112
|
tests/const.py
|
|
113
113
|
tests/util.py
|
|
114
|
-
tests/
|
|
115
|
-
tests/
|
|
116
|
-
tests/
|
|
117
|
-
tests/
|
|
118
|
-
tests/
|
|
119
|
-
tests/
|
|
120
|
-
tests/
|
|
121
|
-
tests/
|
|
114
|
+
tests/e2e/__init__.py
|
|
115
|
+
tests/e2e/conftest.py
|
|
116
|
+
tests/e2e/test_help.py
|
|
117
|
+
tests/e2e/test_main.py
|
|
118
|
+
tests/e2e/cmd_changelog/__init__.py
|
|
119
|
+
tests/e2e/cmd_changelog/test_changelog.py
|
|
120
|
+
tests/e2e/cmd_config/__init__.py
|
|
121
|
+
tests/e2e/cmd_config/test_generate_config.py
|
|
122
|
+
tests/e2e/cmd_publish/__init__.py
|
|
123
|
+
tests/e2e/cmd_publish/test_publish.py
|
|
124
|
+
tests/e2e/cmd_version/__init__.py
|
|
125
|
+
tests/e2e/cmd_version/test_version.py
|
|
126
|
+
tests/e2e/cmd_version/test_version_build.py
|
|
127
|
+
tests/e2e/cmd_version/test_version_bump.py
|
|
128
|
+
tests/e2e/cmd_version/test_version_changelog.py
|
|
129
|
+
tests/e2e/cmd_version/test_version_github_actions.py
|
|
130
|
+
tests/e2e/cmd_version/test_version_print.py
|
|
131
|
+
tests/e2e/cmd_version/test_version_release_notes.py
|
|
132
|
+
tests/e2e/cmd_version/test_version_stamp.py
|
|
133
|
+
tests/e2e/cmd_version/test_version_strict.py
|
|
122
134
|
tests/fixtures/__init__.py
|
|
123
135
|
tests/fixtures/commit_parsers.py
|
|
124
136
|
tests/fixtures/example_project.py
|
|
125
137
|
tests/fixtures/git_repo.py
|
|
126
138
|
tests/fixtures/scipy.py
|
|
127
139
|
tests/fixtures/repos/__init__.py
|
|
140
|
+
tests/fixtures/repos/repo_initial_commit.py
|
|
128
141
|
tests/fixtures/repos/git_flow/__init__.py
|
|
129
142
|
tests/fixtures/repos/git_flow/repo_w_2_release_channels.py
|
|
130
143
|
tests/fixtures/repos/git_flow/repo_w_3_release_channels.py
|
|
@@ -134,19 +147,17 @@ tests/fixtures/repos/trunk_based_dev/__init__.py
|
|
|
134
147
|
tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py
|
|
135
148
|
tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py
|
|
136
149
|
tests/fixtures/repos/trunk_based_dev/repo_w_tags.py
|
|
137
|
-
tests/scenario/__init__.py
|
|
138
|
-
tests/scenario/test_next_version.py
|
|
139
|
-
tests/scenario/test_release_history.py
|
|
140
|
-
tests/scenario/test_template_render.py
|
|
141
|
-
tests/scenario/test_version_stamp.py
|
|
142
150
|
tests/unit/__init__.py
|
|
151
|
+
tests/unit/conftest.py
|
|
143
152
|
tests/unit/semantic_release/__init__.py
|
|
144
153
|
tests/unit/semantic_release/test_helpers.py
|
|
145
154
|
tests/unit/semantic_release/changelog/__init__.py
|
|
146
155
|
tests/unit/semantic_release/changelog/test_changelog_context.py
|
|
147
156
|
tests/unit/semantic_release/changelog/test_default_changelog.py
|
|
157
|
+
tests/unit/semantic_release/changelog/test_release_history.py
|
|
148
158
|
tests/unit/semantic_release/changelog/test_release_notes.py
|
|
149
159
|
tests/unit/semantic_release/changelog/test_template.py
|
|
160
|
+
tests/unit/semantic_release/changelog/test_template_render.py
|
|
150
161
|
tests/unit/semantic_release/cli/__init__.py
|
|
151
162
|
tests/unit/semantic_release/cli/test_config.py
|
|
152
163
|
tests/unit/semantic_release/cli/test_github_actions_output.py
|
|
@@ -33,12 +33,13 @@ types-requests~=2.32.0
|
|
|
33
33
|
coverage[toml]~=7.0
|
|
34
34
|
pyyaml~=6.0
|
|
35
35
|
pytest~=8.3
|
|
36
|
+
pytest-clarity~=1.0
|
|
37
|
+
pytest-cov~=5.0
|
|
36
38
|
pytest-env~=1.0
|
|
37
|
-
pytest-xdist~=3.0
|
|
38
|
-
pytest-mock~=3.0
|
|
39
39
|
pytest-lazy-fixtures~=1.1.1
|
|
40
|
-
pytest-
|
|
40
|
+
pytest-mock~=3.0
|
|
41
|
+
pytest-order~=1.3
|
|
41
42
|
pytest-pretty~=1.2
|
|
42
|
-
pytest-
|
|
43
|
+
pytest-xdist~=3.0
|
|
43
44
|
responses~=0.25.0
|
|
44
45
|
requests-mock~=1.10
|
|
@@ -110,7 +110,7 @@ def convert_md_to_rst(md_content: str) -> str:
|
|
|
110
110
|
# Replace markdown bullets with rst bullets
|
|
111
111
|
"bullets": (regexp(r"^(\s*)-(\s)"), r"\1*\2"),
|
|
112
112
|
# Replace markdown inline raw content with rst inline raw content
|
|
113
|
-
"raw-inline": (regexp(r"(?<=\s)(`[^`]+`)(?![`_])
|
|
113
|
+
"raw-inline": (regexp(r"(?<=\s)(`[^`]+`)(?![`_])"), r"`\1`"),
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
for pattern, replacement in replacements.values():
|
|
@@ -16,6 +16,7 @@ from semantic_release.changelog.context import (
|
|
|
16
16
|
make_changelog_context,
|
|
17
17
|
)
|
|
18
18
|
from semantic_release.changelog.template import environment, recursive_render
|
|
19
|
+
from semantic_release.cli.config import ChangelogOutputFormat
|
|
19
20
|
from semantic_release.cli.const import (
|
|
20
21
|
DEFAULT_CHANGELOG_NAME_STEM,
|
|
21
22
|
DEFAULT_RELEASE_NOTES_TPL_FILE,
|
|
@@ -29,7 +30,7 @@ if TYPE_CHECKING:
|
|
|
29
30
|
|
|
30
31
|
from semantic_release.changelog.context import ChangelogContext
|
|
31
32
|
from semantic_release.changelog.release_history import Release, ReleaseHistory
|
|
32
|
-
from semantic_release.cli.config import
|
|
33
|
+
from semantic_release.cli.config import RuntimeContext
|
|
33
34
|
from semantic_release.hvcs._base import HvcsBase
|
|
34
35
|
|
|
35
36
|
|
|
@@ -193,7 +194,7 @@ def write_changelog_files(
|
|
|
193
194
|
|
|
194
195
|
with suppress(ValueError):
|
|
195
196
|
# do not include a release notes override when considering number of changelog templates
|
|
196
|
-
user_templates.remove(template_dir /
|
|
197
|
+
user_templates.remove(template_dir / DEFAULT_RELEASE_NOTES_TPL_FILE)
|
|
197
198
|
|
|
198
199
|
# Render user templates if found
|
|
199
200
|
if len(user_templates) > 0:
|
|
@@ -226,12 +227,16 @@ def generate_release_notes(
|
|
|
226
227
|
history: ReleaseHistory,
|
|
227
228
|
style: str,
|
|
228
229
|
) -> str:
|
|
229
|
-
users_tpl_file = template_dir /
|
|
230
|
+
users_tpl_file = template_dir / DEFAULT_RELEASE_NOTES_TPL_FILE
|
|
230
231
|
|
|
231
232
|
# Determine if the user has a custom release notes template or we should use
|
|
232
233
|
# the default template directory with our default release notes template
|
|
233
234
|
tpl_dir = (
|
|
234
|
-
template_dir
|
|
235
|
+
template_dir
|
|
236
|
+
if users_tpl_file.is_file()
|
|
237
|
+
else get_default_tpl_dir(
|
|
238
|
+
style=style, sub_dir=ChangelogOutputFormat.MARKDOWN.value
|
|
239
|
+
)
|
|
235
240
|
)
|
|
236
241
|
|
|
237
242
|
release_notes_tpl_file = (
|
|
@@ -257,6 +262,9 @@ def generate_release_notes(
|
|
|
257
262
|
release_notes_env.globals["context"] = {
|
|
258
263
|
"history": history,
|
|
259
264
|
}
|
|
265
|
+
release_notes_env.globals["ctx"] = {
|
|
266
|
+
"history": history,
|
|
267
|
+
}
|
|
260
268
|
|
|
261
269
|
return render_release_notes(
|
|
262
270
|
release_notes_template_file=release_notes_tpl_file,
|
|
@@ -512,17 +512,6 @@ def version( # noqa: C901
|
|
|
512
512
|
if build_metadata:
|
|
513
513
|
new_version.build_metadata = build_metadata
|
|
514
514
|
|
|
515
|
-
if as_prerelease:
|
|
516
|
-
before_conversion, new_version = (
|
|
517
|
-
new_version,
|
|
518
|
-
new_version.to_prerelease(token=translator.prerelease_token),
|
|
519
|
-
)
|
|
520
|
-
log.info(
|
|
521
|
-
"Converting %s to %s due to '--as-prerelease' command-line option",
|
|
522
|
-
before_conversion,
|
|
523
|
-
new_version,
|
|
524
|
-
)
|
|
525
|
-
|
|
526
515
|
# Update GitHub Actions output value with new version & set delayed write
|
|
527
516
|
gha_output.version = new_version
|
|
528
517
|
ctx.call_on_close(gha_output.write_if_possible)
|
|
@@ -7,6 +7,8 @@ from __future__ import annotations
|
|
|
7
7
|
|
|
8
8
|
import logging
|
|
9
9
|
import re
|
|
10
|
+
from functools import reduce
|
|
11
|
+
from re import compile as regexp
|
|
10
12
|
from typing import TYPE_CHECKING, Tuple
|
|
11
13
|
|
|
12
14
|
from pydantic.dataclasses import dataclass
|
|
@@ -47,22 +49,28 @@ LONG_TYPE_NAMES = {
|
|
|
47
49
|
class AngularParserOptions(ParserOptions):
|
|
48
50
|
"""Options dataclass for AngularCommitParser"""
|
|
49
51
|
|
|
52
|
+
minor_tags: Tuple[str, ...] = ("feat",)
|
|
53
|
+
patch_tags: Tuple[str, ...] = ("fix", "perf")
|
|
50
54
|
allowed_tags: Tuple[str, ...] = (
|
|
55
|
+
*minor_tags,
|
|
56
|
+
*patch_tags,
|
|
51
57
|
"build",
|
|
52
58
|
"chore",
|
|
53
59
|
"ci",
|
|
54
60
|
"docs",
|
|
55
|
-
"feat",
|
|
56
|
-
"fix",
|
|
57
|
-
"perf",
|
|
58
61
|
"style",
|
|
59
62
|
"refactor",
|
|
60
63
|
"test",
|
|
61
64
|
)
|
|
62
|
-
minor_tags: Tuple[str, ...] = ("feat",)
|
|
63
|
-
patch_tags: Tuple[str, ...] = ("fix", "perf")
|
|
64
65
|
default_bump_level: LevelBump = LevelBump.NO_RELEASE
|
|
65
66
|
|
|
67
|
+
def __post_init__(self) -> None:
|
|
68
|
+
self.tag_to_level = {tag: self.default_bump_level for tag in self.allowed_tags}
|
|
69
|
+
for tag in self.patch_tags:
|
|
70
|
+
self.tag_to_level[tag] = LevelBump.PATCH
|
|
71
|
+
for tag in self.minor_tags:
|
|
72
|
+
self.tag_to_level[tag] = LevelBump.MINOR
|
|
73
|
+
|
|
66
74
|
|
|
67
75
|
class AngularCommitParser(CommitParser[ParseResult, AngularParserOptions]):
|
|
68
76
|
"""
|
|
@@ -75,21 +83,37 @@ class AngularCommitParser(CommitParser[ParseResult, AngularParserOptions]):
|
|
|
75
83
|
|
|
76
84
|
def __init__(self, options: AngularParserOptions | None = None) -> None:
|
|
77
85
|
super().__init__(options)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
all_possible_types = str.join("|", self.options.allowed_tags)
|
|
87
|
+
self.re_parser = regexp(
|
|
88
|
+
str.join(
|
|
89
|
+
"",
|
|
90
|
+
[
|
|
91
|
+
r"(?P<type>%s)" % all_possible_types,
|
|
92
|
+
r"(?:\((?P<scope>[^\n]+)\))?",
|
|
93
|
+
# TODO: remove ! support as it is not part of the angular commit spec (its part of conventional commits spec)
|
|
94
|
+
r"(?P<break>!)?:\s+",
|
|
95
|
+
r"(?P<subject>[^\n]+)",
|
|
96
|
+
r"(?:\n\n(?P<text>.+))?", # commit body
|
|
97
|
+
],
|
|
98
|
+
),
|
|
99
|
+
flags=re.DOTALL,
|
|
87
100
|
)
|
|
88
101
|
|
|
89
102
|
@staticmethod
|
|
90
103
|
def get_default_options() -> AngularParserOptions:
|
|
91
104
|
return AngularParserOptions()
|
|
92
105
|
|
|
106
|
+
def commit_body_components_separator(
|
|
107
|
+
self, accumulator: dict[str, list[str]], text: str
|
|
108
|
+
) -> dict[str, list[str]]:
|
|
109
|
+
if match := breaking_re.match(text):
|
|
110
|
+
accumulator["breaking_descriptions"].append(match.group(1) or "")
|
|
111
|
+
# TODO: breaking change v10, removes breaking change footers from descriptions
|
|
112
|
+
# return accumulator
|
|
113
|
+
|
|
114
|
+
accumulator["descriptions"].append(text)
|
|
115
|
+
return accumulator
|
|
116
|
+
|
|
93
117
|
# Maybe this can be cached as an optimization, similar to how
|
|
94
118
|
# mypy/pytest use their own caching directories, for very large commit
|
|
95
119
|
# histories?
|
|
@@ -111,31 +135,31 @@ class AngularCommitParser(CommitParser[ParseResult, AngularParserOptions]):
|
|
|
111
135
|
parsed_text = parsed.group("text")
|
|
112
136
|
parsed_type = parsed.group("type")
|
|
113
137
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
138
|
+
body_components: dict[str, list[str]] = reduce(
|
|
139
|
+
self.commit_body_components_separator,
|
|
140
|
+
[
|
|
141
|
+
# Insert the subject before the other paragraphs
|
|
142
|
+
parsed_subject,
|
|
143
|
+
*parse_paragraphs(parsed_text or ""),
|
|
144
|
+
],
|
|
145
|
+
{
|
|
146
|
+
"breaking_descriptions": [],
|
|
147
|
+
"descriptions": [],
|
|
148
|
+
},
|
|
149
|
+
)
|
|
117
150
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
151
|
+
level_bump = (
|
|
152
|
+
LevelBump.MAJOR
|
|
153
|
+
# TODO: remove parsed break support as it is not part of the angular commit spec (its part of conventional commits spec)
|
|
154
|
+
if body_components["breaking_descriptions"] or parsed_break
|
|
155
|
+
else self.options.tag_to_level.get(
|
|
156
|
+
parsed_type, self.options.default_bump_level
|
|
157
|
+
)
|
|
158
|
+
)
|
|
124
159
|
|
|
125
|
-
|
|
126
|
-
|
|
160
|
+
# TODO: remove in the future
|
|
161
|
+
if level_bump == LevelBump.MAJOR:
|
|
127
162
|
parsed_type = "breaking"
|
|
128
|
-
elif parsed_type in self.options.minor_tags:
|
|
129
|
-
level_bump = LevelBump.MINOR
|
|
130
|
-
elif parsed_type in self.options.patch_tags:
|
|
131
|
-
level_bump = LevelBump.PATCH
|
|
132
|
-
else:
|
|
133
|
-
level_bump = self.options.default_bump_level
|
|
134
|
-
logger.debug(
|
|
135
|
-
"commit %s introduces a level bump of %s due to the default_bump_level",
|
|
136
|
-
commit.hexsha[:8],
|
|
137
|
-
level_bump,
|
|
138
|
-
)
|
|
139
163
|
|
|
140
164
|
logger.debug(
|
|
141
165
|
"commit %s introduces a %s level_bump", commit.hexsha[:8], level_bump
|
|
@@ -145,7 +169,7 @@ class AngularCommitParser(CommitParser[ParseResult, AngularParserOptions]):
|
|
|
145
169
|
bump=level_bump,
|
|
146
170
|
type=LONG_TYPE_NAMES.get(parsed_type, parsed_type),
|
|
147
171
|
scope=parsed_scope,
|
|
148
|
-
descriptions=descriptions,
|
|
149
|
-
breaking_descriptions=breaking_descriptions,
|
|
172
|
+
descriptions=body_components["descriptions"],
|
|
173
|
+
breaking_descriptions=body_components["breaking_descriptions"],
|
|
150
174
|
commit=commit,
|
|
151
175
|
)
|
|
@@ -7,16 +7,16 @@ it follows the following logic:
|
|
|
7
7
|
|
|
8
8
|
#}{#
|
|
9
9
|
# Header
|
|
10
|
-
#}{% include "
|
|
10
|
+
#}{% include "changelog_header.md.j2"
|
|
11
11
|
-%}{#
|
|
12
12
|
# Any Unreleased Details (uncommon)
|
|
13
|
-
#}{% include "
|
|
13
|
+
#}{% include "unreleased_changes.md.j2"
|
|
14
14
|
-%}{#
|
|
15
15
|
# Since this is initialization, we are generating all the previous
|
|
16
16
|
# release notes per version.
|
|
17
17
|
#}{% for release in context.history.released.values()
|
|
18
18
|
%}{{ "\n"
|
|
19
|
-
}}{% include "
|
|
19
|
+
}}{% include "versioned_changes.md.j2"
|
|
20
20
|
-%}{{ "\n"
|
|
21
21
|
}}{% endfor
|
|
22
22
|
%}
|
|
@@ -20,7 +20,7 @@ This Update changelog template uses the following logic:
|
|
|
20
20
|
#}{{ changelog_parts[0]
|
|
21
21
|
}}{% else
|
|
22
22
|
%}{# # File was empty or did not exist, therefore, it will be created from scratch
|
|
23
|
-
#}{% include "
|
|
23
|
+
#}{% include "changelog_init.md.j2"
|
|
24
24
|
%}{% endif
|
|
25
25
|
%}{% else
|
|
26
26
|
%}{#
|
|
@@ -39,14 +39,14 @@ This Update changelog template uses the following logic:
|
|
|
39
39
|
}}{% endif
|
|
40
40
|
%}{#
|
|
41
41
|
# Any Unreleased Details (uncommon)
|
|
42
|
-
#}{% include "
|
|
42
|
+
#}{% include "unreleased_changes.md.j2"
|
|
43
43
|
-%}{#
|
|
44
44
|
# Latest Release Details
|
|
45
45
|
#}{% for release in new_releases
|
|
46
46
|
%}{# # Check if the release version is already in the changelog and if not, add it
|
|
47
47
|
#}{% if "# " ~ release.version.as_semver_tag() ~ " " not in changelog_parts[1]
|
|
48
48
|
%}{{ "\n"
|
|
49
|
-
}}{%- include "
|
|
49
|
+
}}{%- include "versioned_changes.md.j2"
|
|
50
50
|
-%}{{ "\n"
|
|
51
51
|
}}{% endif
|
|
52
52
|
%}{% endfor
|