python-semantic-release 10.1.0__tar.gz → 10.2.0__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-10.1.0 → python_semantic_release-10.2.0}/PKG-INFO +2 -2
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/configuration/automatic-releases/github-actions.rst +7 -7
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/configuration/configuration-guides/uv_integration.rst +24 -19
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/configuration/configuration.rst +1 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/pyproject.toml +2 -2
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/python_semantic_release.egg-info/SOURCES.txt +2 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/commands/version.py +1 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/const.py +1 -0
- python_semantic_release-10.2.0/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel_branch_update_merge.py +174 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_build.py +7 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/git_repo.py +10 -3
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/github_flow/__init__.py +1 -0
- python_semantic_release-10.2.0/tests/fixtures/repos/github_flow/repo_w_default_release_w_branch_update_merge.py +471 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/LICENSE +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/MANIFEST.in +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/README.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/Makefile +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/api/commands.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/concepts/changelog_templates.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/concepts/commit_parsing.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/concepts/getting_started.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/concepts/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/concepts/installation.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/concepts/multibranch_releases.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/concepts/strict_mode.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/conf.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/configuration/automatic-releases/cronjobs.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/configuration/automatic-releases/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/configuration/automatic-releases/travis.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/configuration/configuration-guides/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/configuration/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/contributing/contributing_guide.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/contributing/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/make.bat +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/misc/psr_changelog.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/misc/troubleshooting.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/upgrading/08-upgrade.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/upgrading/09-upgrade.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/upgrading/10-upgrade.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/docs/upgrading/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/setup.cfg +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/__main__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/changelog/context.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/changelog/release_history.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/changelog/template.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/changelog_writer.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/cli_context.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/commands/changelog.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/commands/main.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/commands/publish.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/config.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/const.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/github_actions_output.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/masking_filter.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/cli/util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/angular.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/conventional.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/emoji.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/scipy.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/tag.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/const.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.components/changelog_header.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.components/changelog_init.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.components/changelog_update.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.components/changes.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.components/first_release.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.components/macros.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.components/unreleased_changes.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.components/versioned_changes.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/.release_notes.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/md/CHANGELOG.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/.components/changelog_header.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/.components/changelog_init.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/.components/changelog_update.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/.components/changes.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/.components/first_release.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/.components/macros.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/.components/unreleased_changes.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/.components/versioned_changes.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/data/templates/conventional/rst/CHANGELOG.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/enums.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/errors.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/gitproject.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/globals.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/helpers.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/_base.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/bitbucket.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/gitea.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/github.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/gitlab.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/hvcs/util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/py.typed +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/algorithm.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/declaration.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/declarations/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/declarations/enum.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/declarations/i_version_replacer.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/declarations/pattern.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/declarations/toml.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/translator.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/src/semantic_release/version/version.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_changelog/test_changelog.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_changelog/test_changelog_custom_parser.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_changelog/test_changelog_parsing.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_changelog/test_changelog_release_notes.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_config/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_config/test_generate_config.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_publish/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_publish/test_publish.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/git_flow/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_1_channel.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_2_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_3_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_4_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/github_flow/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support_w_prereleases.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_w_prereleases.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_bump.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_changelog.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_github_actions.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_print.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_release_notes.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_stamp.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/cmd_version/test_version_strict.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/test_help.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/e2e/test_main.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/commit_parsers.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/example_project.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/git_flow/repo_w_1_release_channel.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/git_flow/repo_w_4_release_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/github_flow/repo_w_default_release.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/repo_initial_commit.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support_w_prereleases.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/scipy.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/changelog/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/changelog/test_release_history.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/cli/test_config.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/commit_parser/test_conventional.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/version/declarations/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/version/declarations/test_toml_declaration.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/unit/semantic_release/version/test_version.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 10.
|
|
3
|
+
Version: 10.2.0
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -62,7 +62,7 @@ Requires-Dist: pre-commit~=3.5; extra == "dev"
|
|
|
62
62
|
Requires-Dist: tox~=4.11; extra == "dev"
|
|
63
63
|
Requires-Dist: ruff==0.6.1; extra == "dev"
|
|
64
64
|
Provides-Extra: mypy
|
|
65
|
-
Requires-Dist: mypy==1.16.
|
|
65
|
+
Requires-Dist: mypy==1.16.1; extra == "mypy"
|
|
66
66
|
Requires-Dist: types-Deprecated~=1.2; extra == "mypy"
|
|
67
67
|
Requires-Dist: types-requests~=2.32.0; extra == "mypy"
|
|
68
68
|
Requires-Dist: types-pyyaml~=6.0; extra == "mypy"
|
|
@@ -873,14 +873,14 @@ to the GitHub Release Assets as well.
|
|
|
873
873
|
- name: Action | Semantic Version Release
|
|
874
874
|
id: release
|
|
875
875
|
# Adjust tag with desired version if applicable.
|
|
876
|
-
uses: python-semantic-release/python-semantic-release@v10.
|
|
876
|
+
uses: python-semantic-release/python-semantic-release@v10.2.0
|
|
877
877
|
with:
|
|
878
878
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
879
879
|
git_committer_name: "github-actions"
|
|
880
880
|
git_committer_email: "actions@users.noreply.github.com"
|
|
881
881
|
|
|
882
882
|
- name: Publish | Upload to GitHub Release Assets
|
|
883
|
-
uses: python-semantic-release/publish-action@v10.
|
|
883
|
+
uses: python-semantic-release/publish-action@v10.2.0
|
|
884
884
|
if: steps.release.outputs.released == 'true'
|
|
885
885
|
with:
|
|
886
886
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -979,7 +979,7 @@ The equivalent GitHub Action configuration would be:
|
|
|
979
979
|
|
|
980
980
|
- name: Action | Semantic Version Release
|
|
981
981
|
# Adjust tag with desired version if applicable.
|
|
982
|
-
uses: python-semantic-release/python-semantic-release@v10.
|
|
982
|
+
uses: python-semantic-release/python-semantic-release@v10.2.0
|
|
983
983
|
with:
|
|
984
984
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
985
985
|
force: patch
|
|
@@ -1038,14 +1038,14 @@ Publish Action.
|
|
|
1038
1038
|
|
|
1039
1039
|
- name: Release submodule 1
|
|
1040
1040
|
id: release-submod-1
|
|
1041
|
-
uses: python-semantic-release/python-semantic-release@v10.
|
|
1041
|
+
uses: python-semantic-release/python-semantic-release@v10.2.0
|
|
1042
1042
|
with:
|
|
1043
1043
|
directory: ${{ env.SUBMODULE_1_DIR }}
|
|
1044
1044
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
1045
1045
|
|
|
1046
1046
|
- name: Release submodule 2
|
|
1047
1047
|
id: release-submod-2
|
|
1048
|
-
uses: python-semantic-release/python-semantic-release@v10.
|
|
1048
|
+
uses: python-semantic-release/python-semantic-release@v10.2.0
|
|
1049
1049
|
with:
|
|
1050
1050
|
directory: ${{ env.SUBMODULE_2_DIR }}
|
|
1051
1051
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1057,7 +1057,7 @@ Publish Action.
|
|
|
1057
1057
|
# ------------------------------------------------------------------- #
|
|
1058
1058
|
|
|
1059
1059
|
- name: Publish | Upload package 1 to GitHub Release Assets
|
|
1060
|
-
uses: python-semantic-release/publish-action@v10.
|
|
1060
|
+
uses: python-semantic-release/publish-action@v10.2.0
|
|
1061
1061
|
if: steps.release-submod-1.outputs.released == 'true'
|
|
1062
1062
|
with:
|
|
1063
1063
|
directory: ${{ env.SUBMODULE_1_DIR }}
|
|
@@ -1065,7 +1065,7 @@ Publish Action.
|
|
|
1065
1065
|
tag: ${{ steps.release-submod-1.outputs.tag }}
|
|
1066
1066
|
|
|
1067
1067
|
- name: Publish | Upload package 2 to GitHub Release Assets
|
|
1068
|
-
uses: python-semantic-release/publish-action@v10.
|
|
1068
|
+
uses: python-semantic-release/publish-action@v10.2.0
|
|
1069
1069
|
if: steps.release-submod-2.outputs.released == 'true'
|
|
1070
1070
|
with:
|
|
1071
1071
|
directory: ${{ env.SUBMODULE_2_DIR }}
|
|
@@ -44,18 +44,21 @@ resolve this issue depending on your preference:
|
|
|
44
44
|
|
|
45
45
|
[tool.semantic_release]
|
|
46
46
|
build_command = """
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
uv lock --upgrade-package "$PACKAGE_NAME"
|
|
48
|
+
git add uv.lock
|
|
49
|
+
uv build
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
-
The
|
|
53
|
-
updating any dependency versions. The intent of this call is **ONLY** to update
|
|
52
|
+
The intent of the lock upgrade-package call is **ONLY** to update
|
|
54
53
|
the version of your project within the lock file after PSR has updated the version
|
|
55
54
|
in your project's definition file (e.g., ``pyproject.toml``). When you are running
|
|
56
55
|
PSR, you have already tested the project as is and you don't want to actually
|
|
57
56
|
update the dependencies if a new one just became available.
|
|
58
57
|
|
|
58
|
+
For ease of use, PSR provides the ``$PACKAGE_NAME`` environment variable that
|
|
59
|
+
contains the name of your package from the project's definition file
|
|
60
|
+
(``pyproject.toml:project.name``).
|
|
61
|
+
|
|
59
62
|
If you are using the :ref:`PSR GitHub Action <gh_actions-psr>`, you will need to add an
|
|
60
63
|
installation command for ``uv`` to the :ref:`build_command <config-build_command>`
|
|
61
64
|
because the action runs in a Docker environment does not include ``uv`` by default.
|
|
@@ -71,21 +74,23 @@ resolve this issue depending on your preference:
|
|
|
71
74
|
|
|
72
75
|
[tool.semantic_release]
|
|
73
76
|
build_command = """
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
python -m pip install -e '.[build]'
|
|
78
|
+
uv lock --upgrade-package "$PACKAGE_NAME"
|
|
79
|
+
git add uv.lock
|
|
80
|
+
uv build
|
|
78
81
|
"""
|
|
79
82
|
|
|
80
83
|
#. **Stamp the code first & then separately run release**: If you prefer to not modify the
|
|
81
|
-
build command, then you will need to run the ``uv lock --
|
|
82
|
-
creating the release. Essentially, you will run PSR twice:
|
|
83
|
-
in the project's definition file, and (2) a second time
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
build command, then you will need to run the ``uv lock --upgrade-package <your-package-name>``
|
|
85
|
+
command prior to actually creating the release. Essentially, you will run PSR twice:
|
|
86
|
+
(1) once to update the version in the project's definition file, and (2) a second time
|
|
87
|
+
to generate the release.
|
|
88
|
+
|
|
89
|
+
The intent of the ``uv lock --upgrade-package <your-package-name>`` command is **ONLY**
|
|
90
|
+
to update the version of your project within the lock file after PSR has updated the
|
|
91
|
+
version in your project's definition file (e.g., ``pyproject.toml``). When you are
|
|
92
|
+
running PSR, you have already tested the project as is and you don't want to actually
|
|
93
|
+
update the dependencies if a new one just became available.
|
|
89
94
|
|
|
90
95
|
.. code-block:: bash
|
|
91
96
|
|
|
@@ -94,7 +99,7 @@ resolve this issue depending on your preference:
|
|
|
94
99
|
semantic-release -v version --skip-build --no-commit --no-tag --no-changelog
|
|
95
100
|
|
|
96
101
|
# 2. run UV lock as pyproject.toml is updated with the next version
|
|
97
|
-
uv lock --
|
|
102
|
+
uv lock --upgrade-package <your-package-name>
|
|
98
103
|
|
|
99
104
|
# 3. stage the lock file to ensure it is included in the PSR commit
|
|
100
105
|
git add uv.lock
|
|
@@ -129,7 +134,7 @@ look like this:
|
|
|
129
134
|
|
|
130
135
|
[tool.semantic_release]
|
|
131
136
|
build_command = """
|
|
132
|
-
uv lock --
|
|
137
|
+
uv lock --upgrade-package "$PACKAGE_NAME"
|
|
133
138
|
uv build
|
|
134
139
|
"""
|
|
135
140
|
|
|
@@ -210,6 +210,7 @@ GITLAB_CI Pass-through ``true`` if exists in process env, unset
|
|
|
210
210
|
HOME Pass-through ``HOME`` of parent process
|
|
211
211
|
NEW_VERSION Semantically determined next version (ex. ``1.2.3``)
|
|
212
212
|
PATH Pass-through ``PATH`` of parent process
|
|
213
|
+
PACKAGE_NAME Project name as defined in ``pyproject.toml:project.name``
|
|
213
214
|
PSR_DOCKER_GITHUB_ACTION Pass-through ``true`` if exists in process env, unset otherwise
|
|
214
215
|
VIRTUAL_ENV Pass-through ``VIRTUAL_ENV`` if exists in process env, unset otherwise
|
|
215
216
|
======================== ======================================================================
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "python-semantic-release"
|
|
9
|
-
version = "10.
|
|
9
|
+
version = "10.2.0"
|
|
10
10
|
description = "Automatic Semantic Versioning for Python projects"
|
|
11
11
|
requires-python = ">=3.8"
|
|
12
12
|
license = { text = "MIT" }
|
|
@@ -84,7 +84,7 @@ dev = [
|
|
|
84
84
|
"ruff == 0.6.1"
|
|
85
85
|
]
|
|
86
86
|
mypy = [
|
|
87
|
-
"mypy == 1.16.
|
|
87
|
+
"mypy == 1.16.1",
|
|
88
88
|
"types-Deprecated ~= 1.2",
|
|
89
89
|
"types-requests ~= 2.32.0",
|
|
90
90
|
"types-pyyaml ~= 6.0",
|
|
@@ -141,6 +141,7 @@ tests/e2e/cmd_version/bump_version/git_flow/test_repo_3_channels.py
|
|
|
141
141
|
tests/e2e/cmd_version/bump_version/git_flow/test_repo_4_channels.py
|
|
142
142
|
tests/e2e/cmd_version/bump_version/github_flow/__init__.py
|
|
143
143
|
tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py
|
|
144
|
+
tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel_branch_update_merge.py
|
|
144
145
|
tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py
|
|
145
146
|
tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py
|
|
146
147
|
tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py
|
|
@@ -161,6 +162,7 @@ tests/fixtures/repos/git_flow/repo_w_3_release_channels.py
|
|
|
161
162
|
tests/fixtures/repos/git_flow/repo_w_4_release_channels.py
|
|
162
163
|
tests/fixtures/repos/github_flow/__init__.py
|
|
163
164
|
tests/fixtures/repos/github_flow/repo_w_default_release.py
|
|
165
|
+
tests/fixtures/repos/github_flow/repo_w_default_release_w_branch_update_merge.py
|
|
164
166
|
tests/fixtures/repos/github_flow/repo_w_release_channels.py
|
|
165
167
|
tests/fixtures/repos/trunk_based_dev/__init__.py
|
|
166
168
|
tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support.py
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
import tomlkit
|
|
7
|
+
from flatdict import FlatDict
|
|
8
|
+
from freezegun import freeze_time
|
|
9
|
+
|
|
10
|
+
from tests.const import (
|
|
11
|
+
DEFAULT_BRANCH_NAME,
|
|
12
|
+
)
|
|
13
|
+
from tests.fixtures.repos.github_flow import (
|
|
14
|
+
repo_w_github_flow_w_default_release_n_branch_update_merge_conventional_commits,
|
|
15
|
+
repo_w_github_flow_w_default_release_n_branch_update_merge_emoji_commits,
|
|
16
|
+
repo_w_github_flow_w_default_release_n_branch_update_merge_scipy_commits,
|
|
17
|
+
)
|
|
18
|
+
from tests.util import temporary_working_directory
|
|
19
|
+
|
|
20
|
+
if TYPE_CHECKING:
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
from unittest.mock import MagicMock
|
|
23
|
+
|
|
24
|
+
from requests_mock import Mocker
|
|
25
|
+
|
|
26
|
+
from tests.e2e.cmd_version.bump_version.conftest import (
|
|
27
|
+
InitMirrorRepo4RebuildFn,
|
|
28
|
+
RunPSReleaseFn,
|
|
29
|
+
)
|
|
30
|
+
from tests.e2e.conftest import GetSanitizedChangelogContentFn
|
|
31
|
+
from tests.fixtures.example_project import ExProjectDir
|
|
32
|
+
from tests.fixtures.git_repo import (
|
|
33
|
+
BuildRepoFromDefinitionFn,
|
|
34
|
+
BuildSpecificRepoFn,
|
|
35
|
+
CommitConvention,
|
|
36
|
+
GetGitRepo4DirFn,
|
|
37
|
+
RepoActionConfigure,
|
|
38
|
+
RepoActionRelease,
|
|
39
|
+
RepoActions,
|
|
40
|
+
SplitRepoActionsByReleaseTagsFn,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@pytest.mark.xfail(
|
|
45
|
+
reason="Should pass after [#1252](https://github.com/python-semantic-release/python-semantic-release/issues/1252) is fixed",
|
|
46
|
+
)
|
|
47
|
+
@pytest.mark.parametrize(
|
|
48
|
+
"repo_fixture_name",
|
|
49
|
+
[
|
|
50
|
+
pytest.param(repo_fixture_name, marks=pytest.mark.comprehensive)
|
|
51
|
+
for repo_fixture_name in [
|
|
52
|
+
repo_w_github_flow_w_default_release_n_branch_update_merge_conventional_commits.__name__,
|
|
53
|
+
repo_w_github_flow_w_default_release_n_branch_update_merge_emoji_commits.__name__,
|
|
54
|
+
repo_w_github_flow_w_default_release_n_branch_update_merge_scipy_commits.__name__,
|
|
55
|
+
]
|
|
56
|
+
],
|
|
57
|
+
)
|
|
58
|
+
def test_github_flow_repo_w_default_release_n_branch_update_merge(
|
|
59
|
+
repo_fixture_name: str,
|
|
60
|
+
run_psr_release: RunPSReleaseFn,
|
|
61
|
+
build_github_flow_repo_w_default_release_n_branch_update_merge: BuildSpecificRepoFn,
|
|
62
|
+
split_repo_actions_by_release_tags: SplitRepoActionsByReleaseTagsFn,
|
|
63
|
+
init_mirror_repo_for_rebuild: InitMirrorRepo4RebuildFn,
|
|
64
|
+
example_project_dir: ExProjectDir,
|
|
65
|
+
git_repo_for_directory: GetGitRepo4DirFn,
|
|
66
|
+
build_repo_from_definition: BuildRepoFromDefinitionFn,
|
|
67
|
+
mocked_git_push: MagicMock,
|
|
68
|
+
post_mocker: Mocker,
|
|
69
|
+
default_tag_format_str: str,
|
|
70
|
+
version_py_file: Path,
|
|
71
|
+
get_sanitized_md_changelog_content: GetSanitizedChangelogContentFn,
|
|
72
|
+
get_sanitized_rst_changelog_content: GetSanitizedChangelogContentFn,
|
|
73
|
+
):
|
|
74
|
+
# build target repo into a temporary directory
|
|
75
|
+
target_repo_dir = example_project_dir / repo_fixture_name
|
|
76
|
+
commit_type: CommitConvention = (
|
|
77
|
+
repo_fixture_name.split("commits", 1)[0].split("_")[-2] # type: ignore[assignment]
|
|
78
|
+
)
|
|
79
|
+
target_repo_definition = (
|
|
80
|
+
build_github_flow_repo_w_default_release_n_branch_update_merge(
|
|
81
|
+
repo_name=repo_fixture_name,
|
|
82
|
+
commit_type=commit_type,
|
|
83
|
+
dest_dir=target_repo_dir,
|
|
84
|
+
)
|
|
85
|
+
)
|
|
86
|
+
target_git_repo = git_repo_for_directory(target_repo_dir)
|
|
87
|
+
target_repo_pyproject_toml = FlatDict(
|
|
88
|
+
tomlkit.loads((target_repo_dir / "pyproject.toml").read_text(encoding="utf-8")),
|
|
89
|
+
delimiter=".",
|
|
90
|
+
)
|
|
91
|
+
tag_format_str: str = target_repo_pyproject_toml.get( # type: ignore[assignment]
|
|
92
|
+
"tool.semantic_release.tag_format",
|
|
93
|
+
default_tag_format_str,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
# split repo actions by release actions
|
|
97
|
+
releasetags_2_steps: dict[str, list[RepoActions]] = (
|
|
98
|
+
split_repo_actions_by_release_tags(target_repo_definition, tag_format_str)
|
|
99
|
+
)
|
|
100
|
+
configuration_step: RepoActionConfigure = releasetags_2_steps.pop("")[0] # type: ignore[assignment]
|
|
101
|
+
|
|
102
|
+
# Create the mirror repo directory
|
|
103
|
+
mirror_repo_dir = init_mirror_repo_for_rebuild(
|
|
104
|
+
mirror_repo_dir=(example_project_dir / "mirror"),
|
|
105
|
+
configuration_step=configuration_step,
|
|
106
|
+
)
|
|
107
|
+
mirror_git_repo = git_repo_for_directory(mirror_repo_dir)
|
|
108
|
+
|
|
109
|
+
# rebuild repo from scratch stopping before each release tag
|
|
110
|
+
for curr_release_tag, steps in releasetags_2_steps.items():
|
|
111
|
+
# make sure mocks are clear
|
|
112
|
+
mocked_git_push.reset_mock()
|
|
113
|
+
post_mocker.reset_mock()
|
|
114
|
+
|
|
115
|
+
# Extract expected result from target repo
|
|
116
|
+
head_reference_name = (
|
|
117
|
+
curr_release_tag
|
|
118
|
+
if curr_release_tag != "Unreleased"
|
|
119
|
+
else DEFAULT_BRANCH_NAME
|
|
120
|
+
)
|
|
121
|
+
target_git_repo.git.checkout(head_reference_name, detach=True)
|
|
122
|
+
expected_md_changelog_content = get_sanitized_md_changelog_content(
|
|
123
|
+
repo_dir=target_repo_dir
|
|
124
|
+
)
|
|
125
|
+
expected_rst_changelog_content = get_sanitized_rst_changelog_content(
|
|
126
|
+
repo_dir=target_repo_dir
|
|
127
|
+
)
|
|
128
|
+
expected_pyproject_toml_content = (
|
|
129
|
+
target_repo_dir / "pyproject.toml"
|
|
130
|
+
).read_text()
|
|
131
|
+
expected_version_file_content = (target_repo_dir / version_py_file).read_text()
|
|
132
|
+
expected_release_commit_text = target_git_repo.head.commit.message
|
|
133
|
+
|
|
134
|
+
# In our repo env, start building the repo from the definition
|
|
135
|
+
build_repo_from_definition(
|
|
136
|
+
dest_dir=mirror_repo_dir,
|
|
137
|
+
repo_construction_steps=steps[:-1], # stop before the release step
|
|
138
|
+
)
|
|
139
|
+
release_action_step: RepoActionRelease = steps[-1] # type: ignore[assignment]
|
|
140
|
+
|
|
141
|
+
# Act: run PSR on the repo instead of the RELEASE step
|
|
142
|
+
with freeze_time(
|
|
143
|
+
release_action_step["details"]["datetime"]
|
|
144
|
+
), temporary_working_directory(mirror_repo_dir):
|
|
145
|
+
run_psr_release(
|
|
146
|
+
next_version_str=release_action_step["details"]["version"],
|
|
147
|
+
git_repo=mirror_git_repo,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
# take measurement after running the version command
|
|
151
|
+
actual_release_commit_text = mirror_git_repo.head.commit.message
|
|
152
|
+
actual_pyproject_toml_content = (mirror_repo_dir / "pyproject.toml").read_text()
|
|
153
|
+
actual_version_file_content = (mirror_repo_dir / version_py_file).read_text()
|
|
154
|
+
actual_md_changelog_content = get_sanitized_md_changelog_content(
|
|
155
|
+
repo_dir=mirror_repo_dir
|
|
156
|
+
)
|
|
157
|
+
actual_rst_changelog_content = get_sanitized_rst_changelog_content(
|
|
158
|
+
repo_dir=mirror_repo_dir
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
# Evaluate (normal release actions should have occurred as expected)
|
|
162
|
+
# ------------------------------------------------------------------
|
|
163
|
+
# Make sure version file is updated
|
|
164
|
+
assert expected_pyproject_toml_content == actual_pyproject_toml_content
|
|
165
|
+
assert expected_version_file_content == actual_version_file_content
|
|
166
|
+
# Make sure changelog is updated
|
|
167
|
+
assert expected_md_changelog_content == actual_md_changelog_content
|
|
168
|
+
assert expected_rst_changelog_content == actual_rst_changelog_content
|
|
169
|
+
# Make sure commit is created
|
|
170
|
+
assert expected_release_commit_text == actual_release_commit_text
|
|
171
|
+
# Make sure tag is created
|
|
172
|
+
assert curr_release_tag in [tag.name for tag in mirror_git_repo.tags]
|
|
173
|
+
assert mocked_git_push.call_count == 2 # 1 for commit, 1 for tag
|
|
174
|
+
assert post_mocker.call_count == 1 # vcs release creation occured
|
|
@@ -109,6 +109,7 @@ def test_version_runs_build_command(
|
|
|
109
109
|
check=True,
|
|
110
110
|
env={
|
|
111
111
|
"NEW_VERSION": next_release_version, # injected into environment
|
|
112
|
+
"PACKAGE_NAME": "", # PSR injected environment variable
|
|
112
113
|
"CI": patched_os_environment["CI"],
|
|
113
114
|
"BITBUCKET_CI": "true", # Converted
|
|
114
115
|
"GITHUB_ACTIONS": patched_os_environment["GITHUB_ACTIONS"],
|
|
@@ -168,6 +169,8 @@ def test_version_runs_build_command_windows(
|
|
|
168
169
|
)
|
|
169
170
|
|
|
170
171
|
# Setup
|
|
172
|
+
package_name = "my-package"
|
|
173
|
+
update_pyproject_toml("project.name", package_name)
|
|
171
174
|
built_wheel_file = get_wheel_file(next_release_version)
|
|
172
175
|
pyproject_config = FlatDict(
|
|
173
176
|
tomlkit.loads(example_pyproject_toml.read_text(encoding="utf-8")),
|
|
@@ -205,6 +208,7 @@ def test_version_runs_build_command_windows(
|
|
|
205
208
|
env={
|
|
206
209
|
**clean_os_environment,
|
|
207
210
|
"NEW_VERSION": next_release_version, # injected into environment
|
|
211
|
+
"PACKAGE_NAME": package_name, # PSR injected environment variable
|
|
208
212
|
"CI": patched_os_environment["CI"],
|
|
209
213
|
"BITBUCKET_CI": "true", # Converted
|
|
210
214
|
"GITHUB_ACTIONS": patched_os_environment["GITHUB_ACTIONS"],
|
|
@@ -276,6 +280,8 @@ def test_version_runs_build_command_w_user_env(
|
|
|
276
280
|
"=ignored-invalid-named-var", # TODO: validation error instead, but currently just ignore
|
|
277
281
|
],
|
|
278
282
|
)
|
|
283
|
+
package_name = "my-package"
|
|
284
|
+
update_pyproject_toml("project.name", package_name)
|
|
279
285
|
|
|
280
286
|
# Mock out subprocess.run
|
|
281
287
|
with mock.patch(
|
|
@@ -309,6 +315,7 @@ def test_version_runs_build_command_w_user_env(
|
|
|
309
315
|
env={
|
|
310
316
|
**clean_os_environment,
|
|
311
317
|
"NEW_VERSION": next_release_version, # injected into environment
|
|
318
|
+
"PACKAGE_NAME": package_name, # PSR injected environment variable
|
|
312
319
|
"CI": patched_os_environment["CI"],
|
|
313
320
|
"BITBUCKET_CI": "true", # Converted
|
|
314
321
|
"GITHUB_ACTIONS": patched_os_environment["GITHUB_ACTIONS"],
|
{python_semantic_release-10.1.0 → python_semantic_release-10.2.0}/tests/fixtures/git_repo.py
RENAMED
|
@@ -33,6 +33,7 @@ import tests.util
|
|
|
33
33
|
from tests.const import (
|
|
34
34
|
COMMIT_MESSAGE,
|
|
35
35
|
DEFAULT_BRANCH_NAME,
|
|
36
|
+
DEFAULT_MERGE_STRATEGY_OPTION,
|
|
36
37
|
EXAMPLE_HVCS_DOMAIN,
|
|
37
38
|
EXAMPLE_REPO_NAME,
|
|
38
39
|
EXAMPLE_REPO_OWNER,
|
|
@@ -233,6 +234,7 @@ if TYPE_CHECKING:
|
|
|
233
234
|
branch_name: str,
|
|
234
235
|
commit_def: CommitDef,
|
|
235
236
|
fast_forward: bool = True,
|
|
237
|
+
strategy_option: str = DEFAULT_MERGE_STRATEGY_OPTION,
|
|
236
238
|
) -> CommitDef: ...
|
|
237
239
|
|
|
238
240
|
class CreateSquashMergeCommitFn(Protocol):
|
|
@@ -241,7 +243,7 @@ if TYPE_CHECKING:
|
|
|
241
243
|
git_repo: Repo,
|
|
242
244
|
branch_name: str,
|
|
243
245
|
commit_def: CommitDef,
|
|
244
|
-
strategy_option: str =
|
|
246
|
+
strategy_option: str = DEFAULT_MERGE_STRATEGY_OPTION,
|
|
245
247
|
) -> CommitDef: ...
|
|
246
248
|
|
|
247
249
|
class CommitSpec(TypedDict):
|
|
@@ -311,7 +313,7 @@ if TYPE_CHECKING:
|
|
|
311
313
|
branch_name: str
|
|
312
314
|
commit_def: CommitDef
|
|
313
315
|
fast_forward: Literal[False]
|
|
314
|
-
|
|
316
|
+
strategy_option: NotRequired[str]
|
|
315
317
|
|
|
316
318
|
class RepoActionGitFFMergeDetails(DetailsBase):
|
|
317
319
|
branch_name: str
|
|
@@ -763,6 +765,7 @@ def create_merge_commit(stable_now_date: GetStableDateNowFn) -> CreateMergeCommi
|
|
|
763
765
|
branch_name: str,
|
|
764
766
|
commit_def: CommitDef,
|
|
765
767
|
fast_forward: bool = True,
|
|
768
|
+
strategy_option: str = DEFAULT_MERGE_STRATEGY_OPTION,
|
|
766
769
|
) -> CommitDef:
|
|
767
770
|
curr_dt = stable_now_date()
|
|
768
771
|
commit_dt = (
|
|
@@ -784,6 +787,7 @@ def create_merge_commit(stable_now_date: GetStableDateNowFn) -> CreateMergeCommi
|
|
|
784
787
|
ff=fast_forward,
|
|
785
788
|
no_ff=bool(not fast_forward),
|
|
786
789
|
m=commit_def["msg"],
|
|
790
|
+
strategy_option=strategy_option,
|
|
787
791
|
)
|
|
788
792
|
|
|
789
793
|
# return the commit definition with the sha & message updated
|
|
@@ -804,7 +808,7 @@ def create_squash_merge_commit(
|
|
|
804
808
|
git_repo: Repo,
|
|
805
809
|
branch_name: str,
|
|
806
810
|
commit_def: CommitDef,
|
|
807
|
-
strategy_option: str =
|
|
811
|
+
strategy_option: str = DEFAULT_MERGE_STRATEGY_OPTION,
|
|
808
812
|
) -> CommitDef:
|
|
809
813
|
curr_dt = stable_now_date()
|
|
810
814
|
commit_dt = (
|
|
@@ -1404,6 +1408,9 @@ def build_repo_from_definition( # noqa: C901, its required and its just test co
|
|
|
1404
1408
|
branch_name=merge_def["branch_name"],
|
|
1405
1409
|
commit_def=merge_def["commit_def"],
|
|
1406
1410
|
fast_forward=merge_def["fast_forward"],
|
|
1411
|
+
strategy_option=merge_def.get(
|
|
1412
|
+
"strategy_option", DEFAULT_MERGE_STRATEGY_OPTION
|
|
1413
|
+
),
|
|
1407
1414
|
)
|
|
1408
1415
|
if merge_def["commit_def"]["include_in_changelog"]:
|
|
1409
1416
|
current_commits.append(merge_def["commit_def"])
|