python-semantic-release 9.8.6__tar.gz → 9.8.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_semantic_release-9.8.6/python_semantic_release.egg-info → python_semantic_release-9.8.8}/PKG-INFO +3 -4
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/automatic-releases/github-actions.rst +33 -31
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/changelog_templates.rst +17 -14
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/configuration.rst +19 -8
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/github-action.rst +3 -1
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/pyproject.toml +5 -4
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8/python_semantic_release.egg-info}/PKG-INFO +3 -4
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/requires.txt +2 -3
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/__init__.py +1 -1
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/changelog_writer.py +6 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/commands/changelog.py +5 -2
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/commands/version.py +4 -3
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/config.py +12 -2
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/test_changelog.py +51 -15
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/test_version.py +36 -26
- python_semantic_release-9.8.8/tests/conftest.py +135 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/const.py +7 -6
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/scenario/test_next_version.py +1 -1
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/scenario/test_release_history.py +6 -3
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_config.py +3 -2
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_util.py +1 -1
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test__base.py +1 -1
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_gitea.py +57 -47
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_github.py +55 -50
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/test_declaration.py +1 -1
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/util.py +4 -0
- python_semantic_release-9.8.6/tests/conftest.py +0 -98
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/AUTHORS.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/LICENSE +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/MANIFEST.in +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/README.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/Makefile +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/algorithm.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/automatic-releases/cronjobs.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/automatic-releases/index.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/automatic-releases/travis.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/commands.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/commit-parsing.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/conf.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/contributing.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/contributors.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/index.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/make.bat +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/migrating_from_v7.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/multibranch_releases.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/strict_mode.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/troubleshooting.rst +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/SOURCES.txt +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/dependency_links.txt +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/entry_points.txt +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/top_level.txt +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/__main__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/changelog/context.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/changelog/release_history.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/changelog/template.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/cli_context.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/commands/main.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/commands/publish.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/const.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/github_actions_output.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/masking_filter.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/util.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/commit_parser/angular.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/commit_parser/emoji.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/commit_parser/scipy.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/commit_parser/tag.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/const.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/data/templates/CHANGELOG.md.j2 +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/data/templates/release_notes.md.j2 +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/enums.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/errors.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/gitproject.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/helpers.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/_base.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/bitbucket.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/gitea.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/github.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/gitlab.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/remote_hvcs_base.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/hvcs/util.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/version/algorithm.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/version/declaration.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/version/translator.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/version/version.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/setup.cfg +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/conftest.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/test_generate_config.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/test_help.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/test_main.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/test_publish.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/commit_parsers.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/example_project.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/git_repo.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/github_flow/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/fixtures/scipy.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/scenario/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/scenario/test_template_render.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_version.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_tag.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 9.8.
|
|
3
|
+
Version: 9.8.8
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -41,17 +41,16 @@ Requires-Dist: sphinx-autobuild==2024.2.4; extra == "docs"
|
|
|
41
41
|
Requires-Dist: furo~=2024.1; extra == "docs"
|
|
42
42
|
Provides-Extra: test
|
|
43
43
|
Requires-Dist: coverage[toml]~=7.0; extra == "test"
|
|
44
|
-
Requires-Dist: pytest~=
|
|
44
|
+
Requires-Dist: pytest~=8.3; extra == "test"
|
|
45
45
|
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
46
46
|
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
47
47
|
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
48
|
-
Requires-Dist: pytest-lazy-
|
|
48
|
+
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
49
49
|
Requires-Dist: pytest-cov~=5.0; extra == "test"
|
|
50
50
|
Requires-Dist: pytest-pretty~=1.2; extra == "test"
|
|
51
51
|
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
52
52
|
Requires-Dist: responses~=0.25.0; extra == "test"
|
|
53
53
|
Requires-Dist: requests-mock~=1.10; extra == "test"
|
|
54
|
-
Requires-Dist: types-pytest-lazy-fixture~=0.6.3; extra == "test"
|
|
55
54
|
Provides-Extra: dev
|
|
56
55
|
Requires-Dist: pre-commit~=3.5; extra == "dev"
|
|
57
56
|
Requires-Dist: tox~=4.11; extra == "dev"
|
|
@@ -30,40 +30,42 @@ Example Workflow
|
|
|
30
30
|
|
|
31
31
|
.. code:: yaml
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
33
|
+
name: Semantic Release
|
|
34
|
+
|
|
35
|
+
on:
|
|
36
|
+
push:
|
|
37
|
+
branches:
|
|
38
|
+
- master
|
|
39
|
+
|
|
40
|
+
jobs:
|
|
41
|
+
release:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
concurrency: release
|
|
44
|
+
permissions:
|
|
45
|
+
id-token: write
|
|
46
|
+
contents: write
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v3
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 0
|
|
52
|
+
|
|
53
|
+
- name: Python Semantic Release
|
|
54
|
+
# Adjust tag with desired version if applicable. Version shorthand
|
|
55
|
+
# is NOT available, e.g. vX or vX.X will not work.
|
|
56
|
+
uses: python-semantic-release/python-semantic-release@v9.8.8
|
|
57
|
+
with:
|
|
58
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
59
|
+
|
|
60
|
+
``concurrency`` is a `beta feature of GitHub Actions`_ which disallows two or more
|
|
61
|
+
release jobs to run in parallel. This prevents race conditions if there are multiple
|
|
62
|
+
pushes in a short period of time.
|
|
62
63
|
|
|
63
64
|
If you would like to use Python Semantic Release to create GitHub Releases against
|
|
64
65
|
your repository, you will need to allow the additional ``contents: write`` permission.
|
|
65
66
|
More information can be found in the `permissions for GitHub Apps documentation`_
|
|
66
67
|
|
|
68
|
+
.. _beta feature of GitHub Actions: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idconcurrency
|
|
67
69
|
.. _permissions for GitHub Apps documentation: https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#contents
|
|
68
70
|
|
|
69
71
|
.. warning::
|
|
@@ -92,13 +94,13 @@ multiple projects.
|
|
|
92
94
|
.. code:: yaml
|
|
93
95
|
|
|
94
96
|
- name: Release Project 1
|
|
95
|
-
uses: python-semantic-release/python-semantic-release@
|
|
97
|
+
uses: python-semantic-release/python-semantic-release@v9.8.8
|
|
96
98
|
with:
|
|
97
99
|
directory: ./project1
|
|
98
100
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
99
101
|
|
|
100
102
|
- name: Release Project 2
|
|
101
|
-
uses: python-semantic-release/python-semantic-release@
|
|
103
|
+
uses: python-semantic-release/python-semantic-release@v9.8.8
|
|
102
104
|
with:
|
|
103
105
|
directory: ./project2
|
|
104
106
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
{python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/docs/changelog_templates.rst
RENAMED
|
@@ -3,22 +3,16 @@
|
|
|
3
3
|
Changelog Templates
|
|
4
4
|
===================
|
|
5
5
|
|
|
6
|
-
.. warning::
|
|
7
|
-
If you have an existing changelog in the location you have configured with
|
|
8
|
-
the :ref:`changelog_file <config-changelog-changelog_file>` setting,
|
|
9
|
-
or if you have a template inside your :ref:`template directory <config-changelog-template_dir>`
|
|
10
|
-
which will render to the location of an existing file, Python Semantic Release will
|
|
11
|
-
overwrite the contents of this file.
|
|
12
|
-
|
|
13
|
-
Please make sure to refer to :ref:`changelog-templates-migrating-existing-changelog`.
|
|
14
6
|
|
|
15
|
-
Python Semantic Release
|
|
16
|
-
|
|
17
|
-
:ref:`changelog_file <config-changelog-changelog_file>` setting.
|
|
7
|
+
By default, Python Semantic Release (PSR) will generate a changelog for your project. In the default
|
|
8
|
+
configuration, PSR will use a built-in template files to render the changelog at the file location
|
|
9
|
+
defined by the :ref:`changelog_file <config-changelog-changelog_file>` setting.
|
|
18
10
|
|
|
19
|
-
However,
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
However, you can customize the appearance and file structure of the changelog generation process
|
|
12
|
+
by creating your own template files. This option is available by setting the
|
|
13
|
+
:ref:`template_dir <config-changelog-template_dir>` configuration and populating the directory
|
|
14
|
+
with your custom template files. It will render the an entire directory tree of templates
|
|
15
|
+
as desired if they exist within the template directory.
|
|
22
16
|
|
|
23
17
|
Python Semantic Release uses `Jinja`_ as its template engine, so you should refer to the
|
|
24
18
|
`Template Designer Documentation`_ for guidance on how to customize the appearance of
|
|
@@ -32,6 +26,15 @@ providing the :ref:`--no-changelog <cmd-version-option-changelog>` command-line
|
|
|
32
26
|
|
|
33
27
|
The changelog template is re-rendered on each release.
|
|
34
28
|
|
|
29
|
+
.. warning::
|
|
30
|
+
If you have an existing changelog in the location you have configured with
|
|
31
|
+
the :ref:`changelog_file <config-changelog-changelog_file>` setting,
|
|
32
|
+
or if you have a template inside your :ref:`template directory <config-changelog-template_dir>`
|
|
33
|
+
which will render to the location of an existing file, Python Semantic Release will
|
|
34
|
+
overwrite the contents of this file.
|
|
35
|
+
|
|
36
|
+
Please make sure to refer to :ref:`changelog-templates-migrating-existing-changelog`.
|
|
37
|
+
|
|
35
38
|
.. _Jinja: https://jinja.palletsprojects.com/en/3.1.x/
|
|
36
39
|
.. _Template Designer Documentation: https://jinja.palletsprojects.com/en/3.1.x/templates/
|
|
37
40
|
|
|
@@ -208,6 +208,7 @@ VIRTUAL_ENV Pass-through ``VIRTUAL_ENV`` if exists in process env,
|
|
|
208
208
|
======================== ======================================================================
|
|
209
209
|
|
|
210
210
|
In addition, on windows systems these environment variables are passed:
|
|
211
|
+
|
|
211
212
|
======================== ======================================================================
|
|
212
213
|
Variable Name Description
|
|
213
214
|
======================== ======================================================================
|
|
@@ -215,13 +216,13 @@ ALLUSERSAPPDATA Pass-through ``ALLUSERAPPDATA`` if exists in process e
|
|
|
215
216
|
ALLUSERSPROFILE Pass-through ``ALLUSERSPPPROFILE`` if exists in process env, unset otherwise
|
|
216
217
|
APPDATA Pass-through ``APPDATA`` if exists in process env, unset otherwise
|
|
217
218
|
COMMONPROGRAMFILES Pass-through ``COMMONPROGRAMFILES`` if exists in process env, unset otherwise
|
|
218
|
-
COMMONPROGRAMFILES(
|
|
219
|
+
COMMONPROGRAMFILES(X86) Pass-through ``COMMONPROGRAMFILES(X86)`` if exists in process env, unset otherwise
|
|
219
220
|
DEFAULTUSERPROFILE Pass-through ``DEFAULTUSERPROFILE`` if exists in process env, unset otherwise
|
|
220
221
|
HOMEPATH Pass-through ``HOMEPATH`` if exists in process env, unset otherwise
|
|
221
222
|
PATHEXT Pass-through ``PATHEXT`` if exists in process env, unset otherwise
|
|
222
223
|
PROFILESFOLDER Pass-through ``PROFILESFOLDER`` if exists in process env, unset otherwise
|
|
223
224
|
PROGRAMFILES Pass-through ``PROGRAMFILES`` if exists in process env, unset otherwise
|
|
224
|
-
PROGRAMFILES(
|
|
225
|
+
PROGRAMFILES(X86) Pass-through ``PROGRAMFILES(X86)`` if exists in process env, unset otherwise
|
|
225
226
|
SYSTEM Pass-through ``SYSTEM`` if exists in process env, unset otherwise
|
|
226
227
|
SYSTEM16 Pass-through ``SYSTEM16`` if exists in process env, unset otherwise
|
|
227
228
|
SYSTEM32 Pass-through ``SYSTEM32`` if exists in process env, unset otherwise
|
|
@@ -292,7 +293,12 @@ This section outlines the configuration options available that modify changelog
|
|
|
292
293
|
|
|
293
294
|
**Type:** ``str``
|
|
294
295
|
|
|
295
|
-
Specify the name of the changelog file
|
|
296
|
+
Specify the name of the changelog file that will be created. This file will be created
|
|
297
|
+
or overwritten (if it previously exists) with the rendered default template included
|
|
298
|
+
with Python Semantic Release.
|
|
299
|
+
|
|
300
|
+
If you are using the ``template_dir`` setting for providing customized templates,
|
|
301
|
+
this setting is not used. See :ref:`config-changelog-template_dir` for more information.
|
|
296
302
|
|
|
297
303
|
**Default:** ``"CHANGELOG.md"``
|
|
298
304
|
|
|
@@ -309,15 +315,14 @@ Specify the name of the changelog file (after template rendering has taken place
|
|
|
309
315
|
passed directly to the `jinja2.Environment`_ constructor, and further
|
|
310
316
|
documentation one these parameters can be found there.
|
|
311
317
|
|
|
312
|
-
.. _`jinja2.Environment`: https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Environment
|
|
313
|
-
|
|
314
|
-
.. note::
|
|
315
318
|
**pyproject.toml:** ``[tool.semantic_release.changelog.environment]``
|
|
316
319
|
|
|
317
320
|
**releaserc.toml:** ``[semantic_release.changelog.environment]``
|
|
318
321
|
|
|
319
322
|
**releaserc.json:** ``{ "semantic_release": { "changelog": { "environment": {} } } }``
|
|
320
323
|
|
|
324
|
+
.. _`jinja2.Environment`: https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Environment
|
|
325
|
+
|
|
321
326
|
----
|
|
322
327
|
|
|
323
328
|
.. _config-changelog-environment-autoescape:
|
|
@@ -540,8 +545,14 @@ The patterns in this list are treated as regular expressions.
|
|
|
540
545
|
|
|
541
546
|
**Type:** ``str``
|
|
542
547
|
|
|
543
|
-
|
|
544
|
-
|
|
548
|
+
When files exist within the specified directory, they will be used as templates for
|
|
549
|
+
the changelog rendering process. Regardless if the directory includes a changelog file,
|
|
550
|
+
the provided directory will be rendered and files placed relative to the root of the
|
|
551
|
+
project directory.
|
|
552
|
+
|
|
553
|
+
No default changelog template or release notes template will be used when this directory
|
|
554
|
+
exists and the directory is not empty. If the directory is empty, the default changelog
|
|
555
|
+
template will be used.
|
|
545
556
|
|
|
546
557
|
This option is discussed in more detail at :ref:`changelog-templates`
|
|
547
558
|
|
|
@@ -129,7 +129,9 @@ provide the following inputs:
|
|
|
129
129
|
|
|
130
130
|
# ... the rest of the workflow
|
|
131
131
|
- name: Python Semantic Release
|
|
132
|
-
|
|
132
|
+
# Adjust tag with desired version if applicable. Version shorthand
|
|
133
|
+
# is NOT available, e.g. vX or vX.X will not work.
|
|
134
|
+
uses: python-semantic-release/python-semantic-release@v9.8.8
|
|
133
135
|
with:
|
|
134
136
|
# ... other options
|
|
135
137
|
force: "patch"
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "python-semantic-release"
|
|
9
|
-
version = "9.8.
|
|
9
|
+
version = "9.8.8"
|
|
10
10
|
description = "Automatic Semantic Versioning for Python projects"
|
|
11
11
|
requires-python = ">=3.8"
|
|
12
12
|
license = { text = "MIT" }
|
|
@@ -59,17 +59,16 @@ docs = [
|
|
|
59
59
|
]
|
|
60
60
|
test = [
|
|
61
61
|
"coverage[toml] ~= 7.0",
|
|
62
|
-
"pytest ~=
|
|
62
|
+
"pytest ~= 8.3",
|
|
63
63
|
"pytest-env ~= 1.0",
|
|
64
64
|
"pytest-xdist ~= 3.0",
|
|
65
65
|
"pytest-mock ~= 3.0",
|
|
66
|
-
"pytest-lazy-
|
|
66
|
+
"pytest-lazy-fixtures ~= 1.1.1",
|
|
67
67
|
"pytest-cov ~= 5.0",
|
|
68
68
|
"pytest-pretty ~= 1.2",
|
|
69
69
|
"pytest-clarity ~= 1.0",
|
|
70
70
|
"responses ~= 0.25.0",
|
|
71
71
|
"requests-mock ~= 1.10",
|
|
72
|
-
"types-pytest-lazy-fixture ~= 0.6.3",
|
|
73
72
|
]
|
|
74
73
|
dev = [
|
|
75
74
|
"pre-commit ~= 3.5",
|
|
@@ -376,6 +375,8 @@ ignore_names = ["change_to_ex_proj_dir", "init_example_project"]
|
|
|
376
375
|
logging_use_named_masks = true
|
|
377
376
|
commit_parser = "angular"
|
|
378
377
|
build_command = """
|
|
378
|
+
python -m scripts.bump_version_in_docs
|
|
379
|
+
git add docs/*
|
|
379
380
|
python -m pip install -e .[build]
|
|
380
381
|
python -m build .
|
|
381
382
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 9.8.
|
|
3
|
+
Version: 9.8.8
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -41,17 +41,16 @@ Requires-Dist: sphinx-autobuild==2024.2.4; extra == "docs"
|
|
|
41
41
|
Requires-Dist: furo~=2024.1; extra == "docs"
|
|
42
42
|
Provides-Extra: test
|
|
43
43
|
Requires-Dist: coverage[toml]~=7.0; extra == "test"
|
|
44
|
-
Requires-Dist: pytest~=
|
|
44
|
+
Requires-Dist: pytest~=8.3; extra == "test"
|
|
45
45
|
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
46
46
|
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
47
47
|
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
48
|
-
Requires-Dist: pytest-lazy-
|
|
48
|
+
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
49
49
|
Requires-Dist: pytest-cov~=5.0; extra == "test"
|
|
50
50
|
Requires-Dist: pytest-pretty~=1.2; extra == "test"
|
|
51
51
|
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
52
52
|
Requires-Dist: responses~=0.25.0; extra == "test"
|
|
53
53
|
Requires-Dist: requests-mock~=1.10; extra == "test"
|
|
54
|
-
Requires-Dist: types-pytest-lazy-fixture~=0.6.3; extra == "test"
|
|
55
54
|
Provides-Extra: dev
|
|
56
55
|
Requires-Dist: pre-commit~=3.5; extra == "dev"
|
|
57
56
|
Requires-Dist: tox~=4.11; extra == "dev"
|
|
@@ -31,14 +31,13 @@ types-requests~=2.32.0
|
|
|
31
31
|
|
|
32
32
|
[test]
|
|
33
33
|
coverage[toml]~=7.0
|
|
34
|
-
pytest~=
|
|
34
|
+
pytest~=8.3
|
|
35
35
|
pytest-env~=1.0
|
|
36
36
|
pytest-xdist~=3.0
|
|
37
37
|
pytest-mock~=3.0
|
|
38
|
-
pytest-lazy-
|
|
38
|
+
pytest-lazy-fixtures~=1.1.1
|
|
39
39
|
pytest-cov~=5.0
|
|
40
40
|
pytest-pretty~=1.2
|
|
41
41
|
pytest-clarity~=1.0
|
|
42
42
|
responses~=0.25.0
|
|
43
43
|
requests-mock~=1.10
|
|
44
|
-
types-pytest-lazy-fixture~=0.6.3
|
|
@@ -149,6 +149,7 @@ def generate_release_notes(
|
|
|
149
149
|
hvcs_client: HvcsBase,
|
|
150
150
|
release: Release,
|
|
151
151
|
template_dir: Path,
|
|
152
|
+
history: ReleaseHistory,
|
|
152
153
|
) -> str:
|
|
153
154
|
release_notes_env = ReleaseNotesContext(
|
|
154
155
|
repo_name=hvcs_client.repo_name,
|
|
@@ -163,6 +164,11 @@ def generate_release_notes(
|
|
|
163
164
|
environment(template_dir=template_dir)
|
|
164
165
|
)
|
|
165
166
|
|
|
167
|
+
# TODO: Remove in v10
|
|
168
|
+
release_notes_env.globals["context"] = {
|
|
169
|
+
"history": history,
|
|
170
|
+
}
|
|
171
|
+
|
|
166
172
|
return render_release_notes(
|
|
167
173
|
release_notes_template=get_release_notes_template(template_dir),
|
|
168
174
|
template_env=release_notes_env,
|
|
@@ -34,7 +34,9 @@ def post_release_notes(
|
|
|
34
34
|
"\n",
|
|
35
35
|
[
|
|
36
36
|
f"would have posted the following release notes for tag {release_tag}:",
|
|
37
|
-
|
|
37
|
+
# Escape square brackets to ensure all content is displayed in the console
|
|
38
|
+
# (i.e. prevent interpretation of ansi escape sequences that is valid markdown)
|
|
39
|
+
release_notes.replace("[", "\\["),
|
|
38
40
|
],
|
|
39
41
|
)
|
|
40
42
|
)
|
|
@@ -112,7 +114,8 @@ def changelog(cli_ctx: CliContextObj, release_tag: str | None) -> None:
|
|
|
112
114
|
release_notes = generate_release_notes(
|
|
113
115
|
hvcs_client,
|
|
114
116
|
release,
|
|
115
|
-
|
|
117
|
+
runtime.template_dir,
|
|
118
|
+
release_history,
|
|
116
119
|
)
|
|
117
120
|
|
|
118
121
|
try:
|
|
@@ -189,13 +189,13 @@ def get_windows_env() -> Mapping[str, str | None]:
|
|
|
189
189
|
"ALLUSERSPROFILE",
|
|
190
190
|
"APPDATA",
|
|
191
191
|
"COMMONPROGRAMFILES",
|
|
192
|
-
"COMMONPROGRAMFILES(
|
|
192
|
+
"COMMONPROGRAMFILES(X86)",
|
|
193
193
|
"DEFAULTUSERPROFILE",
|
|
194
194
|
"HOMEPATH",
|
|
195
195
|
"PATHEXT",
|
|
196
196
|
"PROFILESFOLDER",
|
|
197
197
|
"PROGRAMFILES",
|
|
198
|
-
"PROGRAMFILES(
|
|
198
|
+
"PROGRAMFILES(X86)",
|
|
199
199
|
"SYSTEM",
|
|
200
200
|
"SYSTEM16",
|
|
201
201
|
"SYSTEM32",
|
|
@@ -711,7 +711,8 @@ def version( # noqa: C901
|
|
|
711
711
|
release_notes = generate_release_notes(
|
|
712
712
|
hvcs_client,
|
|
713
713
|
release_history.released[new_version],
|
|
714
|
-
|
|
714
|
+
runtime.template_dir,
|
|
715
|
+
history=release_history,
|
|
715
716
|
)
|
|
716
717
|
|
|
717
718
|
exception: Exception | None = None
|
{python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/semantic_release/cli/config.py
RENAMED
|
@@ -568,7 +568,12 @@ class RuntimeContext:
|
|
|
568
568
|
)
|
|
569
569
|
|
|
570
570
|
# changelog_file
|
|
571
|
-
|
|
571
|
+
# Must use absolute after resolve because windows does not resolve if the path does not exist
|
|
572
|
+
# which means it returns a relative path. So we force absolute to ensure path is complete
|
|
573
|
+
# for the next check of path matching
|
|
574
|
+
changelog_file = (
|
|
575
|
+
Path(raw.changelog.changelog_file).expanduser().resolve().absolute()
|
|
576
|
+
)
|
|
572
577
|
|
|
573
578
|
# Prevent path traversal attacks
|
|
574
579
|
if raw.repo_dir not in changelog_file.parents:
|
|
@@ -576,7 +581,12 @@ class RuntimeContext:
|
|
|
576
581
|
"Changelog file destination must be inside of the repository directory."
|
|
577
582
|
)
|
|
578
583
|
|
|
579
|
-
|
|
584
|
+
# Must use absolute after resolve because windows does not resolve if the path does not exist
|
|
585
|
+
# which means it returns a relative path. So we force absolute to ensure path is complete
|
|
586
|
+
# for the next check of path matching
|
|
587
|
+
template_dir = (
|
|
588
|
+
Path(raw.changelog.template_dir).expanduser().resolve().absolute()
|
|
589
|
+
)
|
|
580
590
|
|
|
581
591
|
# Prevent path traversal attacks
|
|
582
592
|
if raw.repo_dir not in template_dir.parents:
|
{python_semantic_release-9.8.6 → python_semantic_release-9.8.8}/tests/command_line/test_changelog.py
RENAMED
|
@@ -3,14 +3,16 @@ from __future__ import annotations
|
|
|
3
3
|
import filecmp
|
|
4
4
|
import os
|
|
5
5
|
import shutil
|
|
6
|
+
import sys
|
|
6
7
|
from typing import TYPE_CHECKING
|
|
7
8
|
from unittest import mock
|
|
8
9
|
|
|
9
10
|
import pytest
|
|
10
11
|
import requests_mock
|
|
11
|
-
from
|
|
12
|
+
from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
|
|
12
13
|
from requests import Session
|
|
13
14
|
|
|
15
|
+
import semantic_release.hvcs.github
|
|
14
16
|
from semantic_release.cli.commands.main import main
|
|
15
17
|
|
|
16
18
|
from tests.const import (
|
|
@@ -226,17 +228,7 @@ def test_changelog_release_tag_not_in_history(
|
|
|
226
228
|
repo_with_single_branch_and_prereleases_angular_commits.__name__
|
|
227
229
|
)
|
|
228
230
|
@pytest.mark.parametrize("args", [("--post-to-release-tag", "v0.1.0")])
|
|
229
|
-
def test_changelog_post_to_release(
|
|
230
|
-
args: list[str],
|
|
231
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
232
|
-
tmp_path_factory: pytest.TempPathFactory,
|
|
233
|
-
example_project_dir: ExProjectDir,
|
|
234
|
-
cli_runner: CliRunner,
|
|
235
|
-
):
|
|
236
|
-
tempdir = tmp_path_factory.mktemp("test_changelog")
|
|
237
|
-
remove_dir_tree(tempdir.resolve(), force=True)
|
|
238
|
-
shutil.copytree(src=str(example_project_dir.resolve()), dst=tempdir)
|
|
239
|
-
|
|
231
|
+
def test_changelog_post_to_release(args: list[str], cli_runner: CliRunner):
|
|
240
232
|
# Set up a requests HTTP session so we can catch the HTTP calls and ensure they're
|
|
241
233
|
# made
|
|
242
234
|
|
|
@@ -256,19 +248,63 @@ def test_changelog_post_to_release(
|
|
|
256
248
|
repo_name=EXAMPLE_REPO_NAME,
|
|
257
249
|
)
|
|
258
250
|
|
|
251
|
+
clean_os_environment = dict(
|
|
252
|
+
filter(
|
|
253
|
+
lambda k_v: k_v[1] is not None,
|
|
254
|
+
{
|
|
255
|
+
"CI": "true",
|
|
256
|
+
"PATH": os.getenv("PATH"),
|
|
257
|
+
"HOME": os.getenv("HOME"),
|
|
258
|
+
"VIRTUAL_ENV": os.getenv("VIRTUAL_ENV", "./.venv"),
|
|
259
|
+
**(
|
|
260
|
+
{}
|
|
261
|
+
if sys.platform != "win32"
|
|
262
|
+
else {
|
|
263
|
+
# Windows Required variables
|
|
264
|
+
"ALLUSERSAPPDATA": os.getenv("ALLUSERSAPPDATA"),
|
|
265
|
+
"ALLUSERSPROFILE": os.getenv("ALLUSERSPROFILE"),
|
|
266
|
+
"APPDATA": os.getenv("APPDATA"),
|
|
267
|
+
"COMMONPROGRAMFILES": os.getenv("COMMONPROGRAMFILES"),
|
|
268
|
+
"COMMONPROGRAMFILES(X86)": os.getenv("COMMONPROGRAMFILES(X86)"),
|
|
269
|
+
"DEFAULTUSERPROFILE": os.getenv("DEFAULTUSERPROFILE"),
|
|
270
|
+
"HOMEPATH": os.getenv("HOMEPATH"),
|
|
271
|
+
"PATHEXT": os.getenv("PATHEXT"),
|
|
272
|
+
"PROFILESFOLDER": os.getenv("PROFILESFOLDER"),
|
|
273
|
+
"PROGRAMFILES": os.getenv("PROGRAMFILES"),
|
|
274
|
+
"PROGRAMFILES(X86)": os.getenv("PROGRAMFILES(X86)"),
|
|
275
|
+
"SYSTEM": os.getenv("SYSTEM"),
|
|
276
|
+
"SYSTEM16": os.getenv("SYSTEM16"),
|
|
277
|
+
"SYSTEM32": os.getenv("SYSTEM32"),
|
|
278
|
+
"SYSTEMDRIVE": os.getenv("SYSTEMDRIVE"),
|
|
279
|
+
"SYSTEMROOT": os.getenv("SYSTEMROOT"),
|
|
280
|
+
"TEMP": os.getenv("TEMP"),
|
|
281
|
+
"TMP": os.getenv("TMP"),
|
|
282
|
+
"USERPROFILE": os.getenv("USERPROFILE"),
|
|
283
|
+
"USERSID": os.getenv("USERSID"),
|
|
284
|
+
"USERNAME": os.getenv("USERNAME"),
|
|
285
|
+
"WINDIR": os.getenv("WINDIR"),
|
|
286
|
+
}
|
|
287
|
+
),
|
|
288
|
+
}.items(),
|
|
289
|
+
)
|
|
290
|
+
)
|
|
291
|
+
|
|
259
292
|
# Patch out env vars that affect changelog URLs but only get set in e.g.
|
|
260
293
|
# Github actions
|
|
261
294
|
with mock.patch(
|
|
262
|
-
|
|
295
|
+
# Patching the specific module's reference to the build_requests_session function
|
|
296
|
+
f"{semantic_release.hvcs.github.__name__}.{semantic_release.hvcs.github.build_requests_session.__name__}",
|
|
263
297
|
return_value=session,
|
|
264
|
-
) as
|
|
298
|
+
) as build_requests_session_mock, mock.patch.dict(
|
|
299
|
+
os.environ, clean_os_environment, clear=True
|
|
300
|
+
):
|
|
265
301
|
# Act
|
|
266
302
|
cli_cmd = [MAIN_PROG_NAME, CHANGELOG_SUBCMD, *args]
|
|
267
303
|
result = cli_runner.invoke(main, cli_cmd[1:])
|
|
268
304
|
|
|
269
305
|
# Evaluate
|
|
270
306
|
assert_successful_exit_code(result, cli_cmd)
|
|
271
|
-
assert
|
|
307
|
+
assert build_requests_session_mock.called
|
|
272
308
|
assert mock_adapter.called
|
|
273
309
|
assert mock_adapter.last_request is not None
|
|
274
310
|
assert expected_request_url == mock_adapter.last_request.url
|