python-semantic-release 10.1.0__tar.gz → 10.3.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.3.0}/PKG-INFO +4 -4
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/README.rst +2 -2
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/concepts/getting_started.rst +1 -1
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/configuration/automatic-releases/github-actions.rst +59 -7
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/configuration/configuration-guides/uv_integration.rst +24 -19
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/configuration/configuration.rst +1 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/pyproject.toml +2 -2
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/python_semantic_release.egg-info/SOURCES.txt +2 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/commands/version.py +40 -28
- python_semantic_release-10.3.0/src/semantic_release/cli/github_actions_output.py +150 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/util.py +2 -2
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/const.py +1 -0
- python_semantic_release-10.3.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.3.0}/tests/e2e/cmd_version/test_version_build.py +7 -0
- python_semantic_release-10.3.0/tests/e2e/cmd_version/test_version_github_actions.py +123 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/git_repo.py +10 -3
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/github_flow/__init__.py +1 -0
- python_semantic_release-10.3.0/tests/fixtures/repos/github_flow/repo_w_default_release_w_branch_update_merge.py +471 -0
- python_semantic_release-10.3.0/tests/unit/semantic_release/cli/test_github_actions_output.py +161 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/util.py +33 -1
- python_semantic_release-10.1.0/src/semantic_release/cli/github_actions_output.py +0 -76
- python_semantic_release-10.1.0/tests/e2e/cmd_version/test_version_github_actions.py +0 -50
- python_semantic_release-10.1.0/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -87
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/LICENSE +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/MANIFEST.in +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/Makefile +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/api/commands.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/concepts/changelog_templates.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/concepts/commit_parsing.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/concepts/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/concepts/installation.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/concepts/multibranch_releases.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/concepts/strict_mode.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/conf.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/configuration/automatic-releases/cronjobs.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/configuration/automatic-releases/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/configuration/automatic-releases/travis.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/configuration/configuration-guides/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/configuration/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/contributing/contributing_guide.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/contributing/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/make.bat +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/misc/psr_changelog.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/misc/troubleshooting.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/upgrading/08-upgrade.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/upgrading/09-upgrade.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/upgrading/10-upgrade.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/upgrading/index.rst +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/setup.cfg +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/__main__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/changelog/context.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/changelog/release_history.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/changelog/template.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/changelog_writer.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/cli_context.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/commands/changelog.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/commands/main.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/commands/publish.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/config.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/const.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/masking_filter.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/angular.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/conventional.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/emoji.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/scipy.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/tag.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/const.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.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.3.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.3.0}/src/semantic_release/data/templates/conventional/md/.components/changes.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.0}/src/semantic_release/data/templates/conventional/md/.components/macros.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.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.3.0}/src/semantic_release/data/templates/conventional/md/.release_notes.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/data/templates/conventional/md/CHANGELOG.md.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.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.3.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.3.0}/src/semantic_release/data/templates/conventional/rst/.components/changes.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.0}/src/semantic_release/data/templates/conventional/rst/.components/macros.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.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.3.0}/src/semantic_release/data/templates/conventional/rst/CHANGELOG.rst.j2 +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/enums.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/errors.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/gitproject.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/globals.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/helpers.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/_base.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/bitbucket.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/gitea.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/github.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/gitlab.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/hvcs/util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/py.typed +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/algorithm.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/declaration.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/declarations/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/declarations/enum.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/declarations/i_version_replacer.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/declarations/pattern.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/declarations/toml.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/translator.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/version/version.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_changelog/test_changelog.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_changelog/test_changelog_custom_parser.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_changelog/test_changelog_parsing.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_changelog/test_changelog_release_notes.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_config/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_config/test_generate_config.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_publish/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_publish/test_publish.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/bump_version/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/bump_version/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/bump_version/git_flow/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.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.3.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.3.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.3.0}/tests/e2e/cmd_version/bump_version/github_flow/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.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.3.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.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.3.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.3.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.3.0}/tests/e2e/cmd_version/test_version.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/test_version_bump.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/test_version_changelog.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/test_version_print.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/test_version_release_notes.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/test_version_stamp.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/cmd_version/test_version_strict.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/test_help.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/e2e/test_main.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/commit_parsers.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/example_project.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/git_flow/repo_w_1_release_channel.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/git_flow/repo_w_4_release_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/github_flow/repo_w_default_release.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/repo_initial_commit.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.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.3.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.3.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/fixtures/scipy.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/changelog/conftest.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/changelog/test_release_history.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/cli/test_config.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/commit_parser/test_conventional.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/version/declarations/__init__.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/version/declarations/test_toml_declaration.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/tests/unit/semantic_release/version/test_version.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.3.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"
|
|
@@ -88,5 +88,5 @@ The usage information and examples for this GitHub Action is available under
|
|
|
88
88
|
the `GitHub Actions section`_ of `python-semantic-release.readthedocs.io`_.
|
|
89
89
|
|
|
90
90
|
.. _python-semantic-release: https://pypi.org/project/python-semantic-release/
|
|
91
|
-
.. _python-semantic-release.readthedocs.io: https://python-semantic-release.readthedocs.io/en/
|
|
92
|
-
.. _GitHub Actions section: https://python-semantic-release.readthedocs.io/en/
|
|
91
|
+
.. _python-semantic-release.readthedocs.io: https://python-semantic-release.readthedocs.io/en/stable/
|
|
92
|
+
.. _GitHub Actions section: https://python-semantic-release.readthedocs.io/en/stable/configuration/automatic-releases/github-actions.html
|
|
@@ -18,5 +18,5 @@ The usage information and examples for this GitHub Action is available under
|
|
|
18
18
|
the `GitHub Actions section`_ of `python-semantic-release.readthedocs.io`_.
|
|
19
19
|
|
|
20
20
|
.. _python-semantic-release: https://pypi.org/project/python-semantic-release/
|
|
21
|
-
.. _python-semantic-release.readthedocs.io: https://python-semantic-release.readthedocs.io/en/
|
|
22
|
-
.. _GitHub Actions section: https://python-semantic-release.readthedocs.io/en/
|
|
21
|
+
.. _python-semantic-release.readthedocs.io: https://python-semantic-release.readthedocs.io/en/stable/
|
|
22
|
+
.. _GitHub Actions section: https://python-semantic-release.readthedocs.io/en/stable/configuration/automatic-releases/github-actions.html
|
{python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/docs/concepts/getting_started.rst
RENAMED
|
@@ -215,7 +215,7 @@ To set commit exclusion patterns for a conventional commits parsers, add the fol
|
|
|
215
215
|
|
|
216
216
|
.. code-block:: toml
|
|
217
217
|
|
|
218
|
-
[tool.semantic_release.changelog
|
|
218
|
+
[tool.semantic_release.changelog]
|
|
219
219
|
# Recommended patterns for conventional commits parser that is scope aware
|
|
220
220
|
exclude_commit_patterns = [
|
|
221
221
|
'''chore(?:\([^)]*?\))?: .+''',
|
|
@@ -513,6 +513,20 @@ and any actions that were taken.
|
|
|
513
513
|
|
|
514
514
|
----
|
|
515
515
|
|
|
516
|
+
.. _gh_actions-psr-outputs-commit_sha:
|
|
517
|
+
|
|
518
|
+
``commit_sha``
|
|
519
|
+
""""""""""""""
|
|
520
|
+
|
|
521
|
+
**Type:** ``string``
|
|
522
|
+
|
|
523
|
+
The commit SHA of the release if a release was made, otherwise an empty string.
|
|
524
|
+
|
|
525
|
+
Example upon release: ``d4c3b2a1e0f9c8b7a6e5d4c3b2a1e0f9c8b7a6e5``
|
|
526
|
+
Example when no release was made: ``""``
|
|
527
|
+
|
|
528
|
+
----
|
|
529
|
+
|
|
516
530
|
.. _gh_actions-psr-outputs-is_prerelease:
|
|
517
531
|
|
|
518
532
|
``is_prerelease``
|
|
@@ -524,6 +538,32 @@ A boolean value indicating whether the released version is a prerelease.
|
|
|
524
538
|
|
|
525
539
|
----
|
|
526
540
|
|
|
541
|
+
.. _gh_actions-psr-outputs-link:
|
|
542
|
+
|
|
543
|
+
``link``
|
|
544
|
+
""""""""
|
|
545
|
+
|
|
546
|
+
**Type:** ``string``
|
|
547
|
+
|
|
548
|
+
The URL link to the release if a release was made, otherwise an empty string.
|
|
549
|
+
|
|
550
|
+
Example upon release: ``https://github.com/user/repo/releases/tag/v1.2.3``
|
|
551
|
+
Example when no release was made: ``""``
|
|
552
|
+
|
|
553
|
+
----
|
|
554
|
+
|
|
555
|
+
.. _gh_actions-psr-outputs-previous_version:
|
|
556
|
+
|
|
557
|
+
``previous_version``
|
|
558
|
+
""""""""""""""""""""
|
|
559
|
+
|
|
560
|
+
**Type:** ``string``
|
|
561
|
+
|
|
562
|
+
The previous version before the release, if a release was or will be made. If no release is detected,
|
|
563
|
+
this will be the current version or an empty string if no previous version exists.
|
|
564
|
+
|
|
565
|
+
----
|
|
566
|
+
|
|
527
567
|
.. _gh_actions-psr-outputs-released:
|
|
528
568
|
|
|
529
569
|
``released``
|
|
@@ -535,6 +575,18 @@ A boolean value indicating whether a release was made.
|
|
|
535
575
|
|
|
536
576
|
----
|
|
537
577
|
|
|
578
|
+
.. _gh_actions-psr-outputs-release_notes:
|
|
579
|
+
|
|
580
|
+
``release_notes``
|
|
581
|
+
"""""""""""""""""""
|
|
582
|
+
|
|
583
|
+
**Type:** ``string``
|
|
584
|
+
|
|
585
|
+
The release notes generated by the release, if any. If no release was made,
|
|
586
|
+
this will be an empty string.
|
|
587
|
+
|
|
588
|
+
----
|
|
589
|
+
|
|
538
590
|
.. _gh_actions-psr-outputs-version:
|
|
539
591
|
|
|
540
592
|
``version``
|
|
@@ -873,14 +925,14 @@ to the GitHub Release Assets as well.
|
|
|
873
925
|
- name: Action | Semantic Version Release
|
|
874
926
|
id: release
|
|
875
927
|
# Adjust tag with desired version if applicable.
|
|
876
|
-
uses: python-semantic-release/python-semantic-release@v10.
|
|
928
|
+
uses: python-semantic-release/python-semantic-release@v10.3.0
|
|
877
929
|
with:
|
|
878
930
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
879
931
|
git_committer_name: "github-actions"
|
|
880
932
|
git_committer_email: "actions@users.noreply.github.com"
|
|
881
933
|
|
|
882
934
|
- name: Publish | Upload to GitHub Release Assets
|
|
883
|
-
uses: python-semantic-release/publish-action@v10.
|
|
935
|
+
uses: python-semantic-release/publish-action@v10.3.0
|
|
884
936
|
if: steps.release.outputs.released == 'true'
|
|
885
937
|
with:
|
|
886
938
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -979,7 +1031,7 @@ The equivalent GitHub Action configuration would be:
|
|
|
979
1031
|
|
|
980
1032
|
- name: Action | Semantic Version Release
|
|
981
1033
|
# Adjust tag with desired version if applicable.
|
|
982
|
-
uses: python-semantic-release/python-semantic-release@v10.
|
|
1034
|
+
uses: python-semantic-release/python-semantic-release@v10.3.0
|
|
983
1035
|
with:
|
|
984
1036
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
985
1037
|
force: patch
|
|
@@ -1038,14 +1090,14 @@ Publish Action.
|
|
|
1038
1090
|
|
|
1039
1091
|
- name: Release submodule 1
|
|
1040
1092
|
id: release-submod-1
|
|
1041
|
-
uses: python-semantic-release/python-semantic-release@v10.
|
|
1093
|
+
uses: python-semantic-release/python-semantic-release@v10.3.0
|
|
1042
1094
|
with:
|
|
1043
1095
|
directory: ${{ env.SUBMODULE_1_DIR }}
|
|
1044
1096
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
1045
1097
|
|
|
1046
1098
|
- name: Release submodule 2
|
|
1047
1099
|
id: release-submod-2
|
|
1048
|
-
uses: python-semantic-release/python-semantic-release@v10.
|
|
1100
|
+
uses: python-semantic-release/python-semantic-release@v10.3.0
|
|
1049
1101
|
with:
|
|
1050
1102
|
directory: ${{ env.SUBMODULE_2_DIR }}
|
|
1051
1103
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1057,7 +1109,7 @@ Publish Action.
|
|
|
1057
1109
|
# ------------------------------------------------------------------- #
|
|
1058
1110
|
|
|
1059
1111
|
- name: Publish | Upload package 1 to GitHub Release Assets
|
|
1060
|
-
uses: python-semantic-release/publish-action@v10.
|
|
1112
|
+
uses: python-semantic-release/publish-action@v10.3.0
|
|
1061
1113
|
if: steps.release-submod-1.outputs.released == 'true'
|
|
1062
1114
|
with:
|
|
1063
1115
|
directory: ${{ env.SUBMODULE_1_DIR }}
|
|
@@ -1065,7 +1117,7 @@ Publish Action.
|
|
|
1065
1117
|
tag: ${{ steps.release-submod-1.outputs.tag }}
|
|
1066
1118
|
|
|
1067
1119
|
- name: Publish | Upload package 2 to GitHub Release Assets
|
|
1068
|
-
uses: python-semantic-release/publish-action@v10.
|
|
1120
|
+
uses: python-semantic-release/publish-action@v10.3.0
|
|
1069
1121
|
if: steps.release-submod-2.outputs.released == 'true'
|
|
1070
1122
|
with:
|
|
1071
1123
|
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.3.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
|
|
@@ -30,6 +30,7 @@ from semantic_release.errors import (
|
|
|
30
30
|
)
|
|
31
31
|
from semantic_release.gitproject import GitProject
|
|
32
32
|
from semantic_release.globals import logger
|
|
33
|
+
from semantic_release.hvcs.github import Github
|
|
33
34
|
from semantic_release.hvcs.remote_hvcs_base import RemoteHvcsBase
|
|
34
35
|
from semantic_release.version.algorithm import (
|
|
35
36
|
next_version,
|
|
@@ -466,7 +467,12 @@ def version( # noqa: C901
|
|
|
466
467
|
major_on_zero = runtime.major_on_zero
|
|
467
468
|
no_verify = runtime.no_git_verify
|
|
468
469
|
opts = runtime.global_cli_options
|
|
469
|
-
gha_output = VersionGitHubActionsOutput(
|
|
470
|
+
gha_output = VersionGitHubActionsOutput(
|
|
471
|
+
hvcs_client
|
|
472
|
+
if isinstance(hvcs_client, Github)
|
|
473
|
+
else Github(hvcs_client.remote_url(use_token=False)),
|
|
474
|
+
released=False,
|
|
475
|
+
)
|
|
470
476
|
|
|
471
477
|
forced_level_bump = None if not force_level else LevelBump.from_string(force_level)
|
|
472
478
|
prerelease = is_forced_prerelease(
|
|
@@ -572,6 +578,12 @@ def version( # noqa: C901
|
|
|
572
578
|
if print_only or print_only_tag:
|
|
573
579
|
return
|
|
574
580
|
|
|
581
|
+
# TODO: need a better way as this is inconsistent if releasing older version patches
|
|
582
|
+
if last_release := last_released(config.repo_dir, tag_format=config.tag_format):
|
|
583
|
+
# If we have a last release, we can set the previous version for the
|
|
584
|
+
# GitHub Actions output
|
|
585
|
+
gha_output.prev_version = last_release[1]
|
|
586
|
+
|
|
575
587
|
with Repo(str(runtime.repo_dir)) as git_repo:
|
|
576
588
|
release_history = ReleaseHistory.from_git_history(
|
|
577
589
|
repo=git_repo,
|
|
@@ -632,6 +644,7 @@ def version( # noqa: C901
|
|
|
632
644
|
**runtime.build_command_env,
|
|
633
645
|
# PSR injected environment variables
|
|
634
646
|
"NEW_VERSION": str(new_version),
|
|
647
|
+
"PACKAGE_NAME": runtime.project_metadata.get("name", ""),
|
|
635
648
|
},
|
|
636
649
|
noop=opts.noop,
|
|
637
650
|
)
|
|
@@ -640,6 +653,29 @@ def version( # noqa: C901
|
|
|
640
653
|
click.echo("Build failed, aborting release", err=True)
|
|
641
654
|
ctx.exit(1)
|
|
642
655
|
|
|
656
|
+
license_cfg = runtime.project_metadata.get(
|
|
657
|
+
"license-expression",
|
|
658
|
+
runtime.project_metadata.get(
|
|
659
|
+
"license",
|
|
660
|
+
"",
|
|
661
|
+
),
|
|
662
|
+
)
|
|
663
|
+
|
|
664
|
+
license_cfg = "" if not isinstance(license_cfg, (str, dict)) else license_cfg
|
|
665
|
+
license_cfg = (
|
|
666
|
+
license_cfg.get("text", "") if isinstance(license_cfg, dict) else license_cfg
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
gha_output.release_notes = release_notes = generate_release_notes(
|
|
670
|
+
hvcs_client,
|
|
671
|
+
release=release_history.released[new_version],
|
|
672
|
+
template_dir=runtime.template_dir,
|
|
673
|
+
history=release_history,
|
|
674
|
+
style=runtime.changelog_style,
|
|
675
|
+
mask_initial_release=runtime.changelog_mask_initial_release,
|
|
676
|
+
license_name="" if not isinstance(license_cfg, str) else license_cfg,
|
|
677
|
+
)
|
|
678
|
+
|
|
643
679
|
project = GitProject(
|
|
644
680
|
directory=runtime.repo_dir,
|
|
645
681
|
commit_author=runtime.commit_author,
|
|
@@ -675,6 +711,9 @@ def version( # noqa: C901
|
|
|
675
711
|
noop=opts.noop,
|
|
676
712
|
)
|
|
677
713
|
|
|
714
|
+
with Repo(str(runtime.repo_dir)) as git_repo:
|
|
715
|
+
gha_output.commit_sha = git_repo.head.commit.hexsha
|
|
716
|
+
|
|
678
717
|
if push_changes:
|
|
679
718
|
remote_url = runtime.hvcs_client.remote_url(
|
|
680
719
|
use_token=not runtime.ignore_token_for_push
|
|
@@ -709,33 +748,6 @@ def version( # noqa: C901
|
|
|
709
748
|
logger.info("Remote does not support releases. Skipping release creation...")
|
|
710
749
|
return
|
|
711
750
|
|
|
712
|
-
license_cfg = runtime.project_metadata.get(
|
|
713
|
-
"license-expression",
|
|
714
|
-
runtime.project_metadata.get(
|
|
715
|
-
"license",
|
|
716
|
-
"",
|
|
717
|
-
),
|
|
718
|
-
)
|
|
719
|
-
|
|
720
|
-
if not isinstance(license_cfg, (str, dict)) or license_cfg is None:
|
|
721
|
-
license_cfg = ""
|
|
722
|
-
|
|
723
|
-
license_name = (
|
|
724
|
-
license_cfg.get("text", "")
|
|
725
|
-
if isinstance(license_cfg, dict)
|
|
726
|
-
else license_cfg or ""
|
|
727
|
-
)
|
|
728
|
-
|
|
729
|
-
release_notes = generate_release_notes(
|
|
730
|
-
hvcs_client,
|
|
731
|
-
release=release_history.released[new_version],
|
|
732
|
-
template_dir=runtime.template_dir,
|
|
733
|
-
history=release_history,
|
|
734
|
-
style=runtime.changelog_style,
|
|
735
|
-
mask_initial_release=runtime.changelog_mask_initial_release,
|
|
736
|
-
license_name=license_name,
|
|
737
|
-
)
|
|
738
|
-
|
|
739
751
|
exception: Exception | None = None
|
|
740
752
|
help_message = ""
|
|
741
753
|
try:
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
from re import compile as regexp
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
|
|
7
|
+
from semantic_release.globals import logger
|
|
8
|
+
from semantic_release.version.version import Version
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
from semantic_release.hvcs.github import Github
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class VersionGitHubActionsOutput:
|
|
17
|
+
OUTPUT_ENV_VAR = "GITHUB_OUTPUT"
|
|
18
|
+
|
|
19
|
+
def __init__(
|
|
20
|
+
self,
|
|
21
|
+
gh_client: Github,
|
|
22
|
+
released: bool | None = None,
|
|
23
|
+
version: Version | None = None,
|
|
24
|
+
commit_sha: str | None = None,
|
|
25
|
+
release_notes: str | None = None,
|
|
26
|
+
prev_version: Version | None = None,
|
|
27
|
+
) -> None:
|
|
28
|
+
self._gh_client = gh_client
|
|
29
|
+
self._released = released
|
|
30
|
+
self._version = version
|
|
31
|
+
self._commit_sha = commit_sha
|
|
32
|
+
self._release_notes = release_notes
|
|
33
|
+
self._prev_version = prev_version
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def released(self) -> bool | None:
|
|
37
|
+
return self._released
|
|
38
|
+
|
|
39
|
+
@released.setter
|
|
40
|
+
def released(self, value: bool) -> None:
|
|
41
|
+
if not isinstance(value, bool):
|
|
42
|
+
raise TypeError("output 'released' is boolean")
|
|
43
|
+
self._released = value
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def version(self) -> Version | None:
|
|
47
|
+
return self._version if self._version is not None else None
|
|
48
|
+
|
|
49
|
+
@version.setter
|
|
50
|
+
def version(self, value: Version) -> None:
|
|
51
|
+
if not isinstance(value, Version):
|
|
52
|
+
raise TypeError("output 'released' should be a Version")
|
|
53
|
+
self._version = value
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def tag(self) -> str | None:
|
|
57
|
+
return self.version.as_tag() if self.version is not None else None
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def is_prerelease(self) -> bool | None:
|
|
61
|
+
return self.version.is_prerelease if self.version is not None else None
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def commit_sha(self) -> str | None:
|
|
65
|
+
return self._commit_sha if self._commit_sha else None
|
|
66
|
+
|
|
67
|
+
@commit_sha.setter
|
|
68
|
+
def commit_sha(self, value: str) -> None:
|
|
69
|
+
if not isinstance(value, str):
|
|
70
|
+
raise TypeError("output 'commit_sha' should be a string")
|
|
71
|
+
|
|
72
|
+
if not regexp(r"^[0-9a-f]{40}$").match(value):
|
|
73
|
+
raise ValueError(
|
|
74
|
+
"output 'commit_sha' should be a valid 40-hex-character SHA"
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
self._commit_sha = value
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def release_notes(self) -> str | None:
|
|
81
|
+
return self._release_notes if self._release_notes else None
|
|
82
|
+
|
|
83
|
+
@release_notes.setter
|
|
84
|
+
def release_notes(self, value: str) -> None:
|
|
85
|
+
if not isinstance(value, str):
|
|
86
|
+
raise TypeError("output 'release_notes' should be a string")
|
|
87
|
+
self._release_notes = value
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def prev_version(self) -> Version | None:
|
|
91
|
+
if not self.released:
|
|
92
|
+
return self.version
|
|
93
|
+
return self._prev_version if self._prev_version else None
|
|
94
|
+
|
|
95
|
+
@prev_version.setter
|
|
96
|
+
def prev_version(self, value: Version) -> None:
|
|
97
|
+
if not isinstance(value, Version):
|
|
98
|
+
raise TypeError("output 'prev_version' should be a Version")
|
|
99
|
+
self._prev_version = value
|
|
100
|
+
|
|
101
|
+
def to_output_text(self) -> str:
|
|
102
|
+
missing: set[str] = set()
|
|
103
|
+
if self.version is None:
|
|
104
|
+
missing.add("version")
|
|
105
|
+
if self.released is None:
|
|
106
|
+
missing.add("released")
|
|
107
|
+
if self.released and self.commit_sha is None:
|
|
108
|
+
missing.add("commit_sha")
|
|
109
|
+
if self.released and self.release_notes is None:
|
|
110
|
+
missing.add("release_notes")
|
|
111
|
+
|
|
112
|
+
if missing:
|
|
113
|
+
raise ValueError(
|
|
114
|
+
f"some required outputs were not set: {', '.join(missing)}"
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
output_values: dict[str, Any] = {
|
|
118
|
+
"released": str(self.released).lower(),
|
|
119
|
+
"version": str(self.version),
|
|
120
|
+
"tag": self.tag,
|
|
121
|
+
"is_prerelease": str(self.is_prerelease).lower(),
|
|
122
|
+
"link": self._gh_client.create_release_url(self.tag) if self.tag else "",
|
|
123
|
+
"previous_version": str(self.prev_version) if self.prev_version else "",
|
|
124
|
+
"commit_sha": self.commit_sha if self.commit_sha else "",
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
multiline_output_values: dict[str, str] = {
|
|
128
|
+
"release_notes": self.release_notes if self.release_notes else "",
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
output_lines = [
|
|
132
|
+
*[f"{key}={value!s}{os.linesep}" for key, value in output_values.items()],
|
|
133
|
+
*[
|
|
134
|
+
f"{key}<<EOF{os.linesep}{value}EOF{os.linesep}"
|
|
135
|
+
if value
|
|
136
|
+
else f"{key}={os.linesep}"
|
|
137
|
+
for key, value in multiline_output_values.items()
|
|
138
|
+
],
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
return str.join("", output_lines)
|
|
142
|
+
|
|
143
|
+
def write_if_possible(self, filename: str | None = None) -> None:
|
|
144
|
+
output_file = filename or os.getenv(self.OUTPUT_ENV_VAR)
|
|
145
|
+
if not output_file:
|
|
146
|
+
logger.info("not writing GitHub Actions output, as no file specified")
|
|
147
|
+
return
|
|
148
|
+
|
|
149
|
+
with open(output_file, "ab") as f:
|
|
150
|
+
f.write(self.to_output_text().encode("utf-8"))
|
{python_semantic_release-10.1.0 → python_semantic_release-10.3.0}/src/semantic_release/cli/util.py
RENAMED
|
@@ -9,6 +9,7 @@ from textwrap import dedent, indent
|
|
|
9
9
|
from typing import Any
|
|
10
10
|
|
|
11
11
|
import rich
|
|
12
|
+
import rich.markup
|
|
12
13
|
import tomlkit
|
|
13
14
|
from tomlkit.exceptions import TOMLKitError
|
|
14
15
|
|
|
@@ -26,8 +27,7 @@ def noop_report(msg: str) -> None:
|
|
|
26
27
|
Rich-prints a msg with a standard prefix to report when an action is not being
|
|
27
28
|
taken due to a "noop" flag
|
|
28
29
|
"""
|
|
29
|
-
|
|
30
|
-
rprint(fullmsg)
|
|
30
|
+
rprint(f"[bold cyan][:shield: NOP] {rich.markup.escape(msg)}")
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def indented(msg: str, prefix: str = " " * 4) -> str:
|