python-semantic-release 9.8.7__tar.gz → 9.8.9__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.9/PKG-INFO +84 -0
- python_semantic_release-9.8.9/README.rst +22 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/automatic-releases/github-actions.rst +3 -3
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/conf.py +2 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/configuration.rst +31 -2
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/github-action.rst +1 -1
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/index.rst +51 -1
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/pyproject.toml +7 -5
- python_semantic_release-9.8.9/python_semantic_release.egg-info/PKG-INFO +84 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/python_semantic_release.egg-info/SOURCES.txt +1 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/python_semantic_release.egg-info/requires.txt +3 -2
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/__init__.py +1 -1
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/commands/version.py +7 -14
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/config.py +24 -3
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/gitea.py +6 -3
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/gitlab.py +27 -54
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/util.py +5 -3
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/command_line/conftest.py +0 -6
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/command_line/test_changelog.py +50 -14
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/command_line/test_version.py +35 -25
- python_semantic_release-9.8.9/tests/conftest.py +141 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/const.py +7 -6
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/scenario/test_release_history.py +5 -2
- python_semantic_release-9.8.9/tests/scenario/test_version_stamp.py +219 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/cli/test_config.py +3 -2
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/hvcs/test_gitea.py +57 -47
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/hvcs/test_github.py +55 -50
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/util.py +4 -0
- python_semantic_release-9.8.7/PKG-INFO +0 -111
- python_semantic_release-9.8.7/README.rst +0 -50
- python_semantic_release-9.8.7/python_semantic_release.egg-info/PKG-INFO +0 -111
- python_semantic_release-9.8.7/tests/conftest.py +0 -98
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/AUTHORS.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/LICENSE +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/MANIFEST.in +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/Makefile +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/algorithm.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/automatic-releases/cronjobs.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/automatic-releases/index.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/automatic-releases/travis.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/changelog_templates.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/commands.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/commit-parsing.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/contributing.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/contributors.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/make.bat +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/migrating_from_v7.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/multibranch_releases.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/strict_mode.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/docs/troubleshooting.rst +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/python_semantic_release.egg-info/dependency_links.txt +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/python_semantic_release.egg-info/entry_points.txt +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/python_semantic_release.egg-info/top_level.txt +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/__main__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/changelog/context.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/changelog/release_history.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/changelog/template.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/changelog_writer.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/cli_context.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/commands/changelog.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/commands/main.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/commands/publish.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/const.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/github_actions_output.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/masking_filter.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/util.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/commit_parser/angular.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/commit_parser/emoji.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/commit_parser/scipy.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/commit_parser/tag.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/const.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/data/templates/CHANGELOG.md.j2 +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/data/templates/release_notes.md.j2 +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/enums.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/errors.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/gitproject.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/helpers.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/_base.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/bitbucket.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/github.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/remote_hvcs_base.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/version/algorithm.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/version/declaration.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/version/translator.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/version/version.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/setup.cfg +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/command_line/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/command_line/test_generate_config.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/command_line/test_help.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/command_line/test_main.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/command_line/test_publish.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/commit_parsers.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/example_project.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/git_repo.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/github_flow/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/fixtures/scipy.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/scenario/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/scenario/test_next_version.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/scenario/test_template_render.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/cli/test_util.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/cli/test_version.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/commit_parser/test_tag.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/version/test_declaration.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/tests/unit/semantic_release/version/test_version.py +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: python-semantic-release
|
|
3
|
+
Version: 9.8.9
|
|
4
|
+
Summary: Automatic Semantic Versioning for Python projects
|
|
5
|
+
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: changelog, https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md
|
|
8
|
+
Project-URL: documentation, https://python-semantic-release.readthedocs.io
|
|
9
|
+
Project-URL: homepage, https://python-semantic-release.readthedocs.io
|
|
10
|
+
Project-URL: issues, https://github.com/python-semantic-release/python-semantic-release/issues
|
|
11
|
+
Project-URL: repository, http://github.com/python-semantic-release/python-semantic-release.git
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/x-rst
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
License-File: AUTHORS.rst
|
|
23
|
+
Requires-Dist: click~=8.0
|
|
24
|
+
Requires-Dist: click-option-group~=0.5
|
|
25
|
+
Requires-Dist: gitpython~=3.0
|
|
26
|
+
Requires-Dist: requests~=2.25
|
|
27
|
+
Requires-Dist: jinja2~=3.1
|
|
28
|
+
Requires-Dist: python-gitlab~=4.0
|
|
29
|
+
Requires-Dist: tomlkit~=0.11
|
|
30
|
+
Requires-Dist: dotty-dict~=1.3
|
|
31
|
+
Requires-Dist: importlib-resources~=6.0
|
|
32
|
+
Requires-Dist: pydantic~=2.0
|
|
33
|
+
Requires-Dist: rich~=13.0
|
|
34
|
+
Requires-Dist: shellingham~=1.5
|
|
35
|
+
Provides-Extra: build
|
|
36
|
+
Requires-Dist: build~=1.2; extra == "build"
|
|
37
|
+
Provides-Extra: docs
|
|
38
|
+
Requires-Dist: Sphinx~=6.0; extra == "docs"
|
|
39
|
+
Requires-Dist: sphinxcontrib-apidoc==0.5.0; extra == "docs"
|
|
40
|
+
Requires-Dist: sphinx-autobuild==2024.2.4; extra == "docs"
|
|
41
|
+
Requires-Dist: furo~=2024.1; extra == "docs"
|
|
42
|
+
Provides-Extra: test
|
|
43
|
+
Requires-Dist: coverage[toml]~=7.0; extra == "test"
|
|
44
|
+
Requires-Dist: pyyaml~=6.0; extra == "test"
|
|
45
|
+
Requires-Dist: pytest~=8.3; extra == "test"
|
|
46
|
+
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
47
|
+
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
48
|
+
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
49
|
+
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
50
|
+
Requires-Dist: pytest-cov~=5.0; extra == "test"
|
|
51
|
+
Requires-Dist: pytest-pretty~=1.2; extra == "test"
|
|
52
|
+
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
53
|
+
Requires-Dist: responses~=0.25.0; extra == "test"
|
|
54
|
+
Requires-Dist: requests-mock~=1.10; extra == "test"
|
|
55
|
+
Provides-Extra: dev
|
|
56
|
+
Requires-Dist: pre-commit~=3.5; extra == "dev"
|
|
57
|
+
Requires-Dist: tox~=4.11; extra == "dev"
|
|
58
|
+
Requires-Dist: ruff==0.6.1; extra == "dev"
|
|
59
|
+
Provides-Extra: mypy
|
|
60
|
+
Requires-Dist: mypy==1.11.2; extra == "mypy"
|
|
61
|
+
Requires-Dist: types-requests~=2.32.0; extra == "mypy"
|
|
62
|
+
|
|
63
|
+
Python Semantic Release
|
|
64
|
+
***********************
|
|
65
|
+
|
|
66
|
+
*Automating Releases via SemVer and Commit Message Conventions*
|
|
67
|
+
|
|
68
|
+
----
|
|
69
|
+
|
|
70
|
+
The official documentation for Python Semantic Release can be found at
|
|
71
|
+
`python-semantic-release.readthedocs.io`_.
|
|
72
|
+
|
|
73
|
+
GitHub Action
|
|
74
|
+
=============
|
|
75
|
+
|
|
76
|
+
When using the Python Semantic Release GitHub Action, it executes the command
|
|
77
|
+
``semantic-release version`` using `python-semantic-release`_.
|
|
78
|
+
|
|
79
|
+
The usage information and examples for this GitHub Action is available under
|
|
80
|
+
the `GitHub Actions section`_ of `python-semantic-release.readthedocs.io`_.
|
|
81
|
+
|
|
82
|
+
.. _python-semantic-release: https://pypi.org/project/python-semantic-release/
|
|
83
|
+
.. _python-semantic-release.readthedocs.io: https://python-semantic-release.readthedocs.io/en/latest/
|
|
84
|
+
.. _GitHub Actions section: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Python Semantic Release
|
|
2
|
+
***********************
|
|
3
|
+
|
|
4
|
+
*Automating Releases via SemVer and Commit Message Conventions*
|
|
5
|
+
|
|
6
|
+
----
|
|
7
|
+
|
|
8
|
+
The official documentation for Python Semantic Release can be found at
|
|
9
|
+
`python-semantic-release.readthedocs.io`_.
|
|
10
|
+
|
|
11
|
+
GitHub Action
|
|
12
|
+
=============
|
|
13
|
+
|
|
14
|
+
When using the Python Semantic Release GitHub Action, it executes the command
|
|
15
|
+
``semantic-release version`` using `python-semantic-release`_.
|
|
16
|
+
|
|
17
|
+
The usage information and examples for this GitHub Action is available under
|
|
18
|
+
the `GitHub Actions section`_ of `python-semantic-release.readthedocs.io`_.
|
|
19
|
+
|
|
20
|
+
.. _python-semantic-release: https://pypi.org/project/python-semantic-release/
|
|
21
|
+
.. _python-semantic-release.readthedocs.io: https://python-semantic-release.readthedocs.io/en/latest/
|
|
22
|
+
.. _GitHub Actions section: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
|
|
@@ -53,7 +53,7 @@ Example Workflow
|
|
|
53
53
|
- name: Python Semantic Release
|
|
54
54
|
# Adjust tag with desired version if applicable. Version shorthand
|
|
55
55
|
# is NOT available, e.g. vX or vX.X will not work.
|
|
56
|
-
uses: python-semantic-release/python-semantic-release@v9.8.
|
|
56
|
+
uses: python-semantic-release/python-semantic-release@v9.8.9
|
|
57
57
|
with:
|
|
58
58
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
59
59
|
|
|
@@ -94,13 +94,13 @@ multiple projects.
|
|
|
94
94
|
.. code:: yaml
|
|
95
95
|
|
|
96
96
|
- name: Release Project 1
|
|
97
|
-
uses: python-semantic-release/python-semantic-release@v9.8.
|
|
97
|
+
uses: python-semantic-release/python-semantic-release@v9.8.9
|
|
98
98
|
with:
|
|
99
99
|
directory: ./project1
|
|
100
100
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
101
101
|
|
|
102
102
|
- name: Release Project 2
|
|
103
|
-
uses: python-semantic-release/python-semantic-release@v9.8.
|
|
103
|
+
uses: python-semantic-release/python-semantic-release@v9.8.9
|
|
104
104
|
with:
|
|
105
105
|
directory: ./project2
|
|
106
106
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -216,13 +216,13 @@ ALLUSERSAPPDATA Pass-through ``ALLUSERAPPDATA`` if exists in process e
|
|
|
216
216
|
ALLUSERSPROFILE Pass-through ``ALLUSERSPPPROFILE`` if exists in process env, unset otherwise
|
|
217
217
|
APPDATA Pass-through ``APPDATA`` if exists in process env, unset otherwise
|
|
218
218
|
COMMONPROGRAMFILES Pass-through ``COMMONPROGRAMFILES`` if exists in process env, unset otherwise
|
|
219
|
-
COMMONPROGRAMFILES(
|
|
219
|
+
COMMONPROGRAMFILES(X86) Pass-through ``COMMONPROGRAMFILES(X86)`` if exists in process env, unset otherwise
|
|
220
220
|
DEFAULTUSERPROFILE Pass-through ``DEFAULTUSERPROFILE`` if exists in process env, unset otherwise
|
|
221
221
|
HOMEPATH Pass-through ``HOMEPATH`` if exists in process env, unset otherwise
|
|
222
222
|
PATHEXT Pass-through ``PATHEXT`` if exists in process env, unset otherwise
|
|
223
223
|
PROFILESFOLDER Pass-through ``PROFILESFOLDER`` if exists in process env, unset otherwise
|
|
224
224
|
PROGRAMFILES Pass-through ``PROGRAMFILES`` if exists in process env, unset otherwise
|
|
225
|
-
PROGRAMFILES(
|
|
225
|
+
PROGRAMFILES(X86) Pass-through ``PROGRAMFILES(X86)`` if exists in process env, unset otherwise
|
|
226
226
|
SYSTEM Pass-through ``SYSTEM`` if exists in process env, unset otherwise
|
|
227
227
|
SYSTEM16 Pass-through ``SYSTEM16`` if exists in process env, unset otherwise
|
|
228
228
|
SYSTEM32 Pass-through ``SYSTEM32`` if exists in process env, unset otherwise
|
|
@@ -1102,4 +1102,33 @@ specified in ``file:variable`` format. For example:
|
|
|
1102
1102
|
"docs/conf.py:version",
|
|
1103
1103
|
]
|
|
1104
1104
|
|
|
1105
|
+
Each version variable will be transformed into a Regular Expression that will be used
|
|
1106
|
+
to substitute the version number in the file. The replacement algorithm is **ONLY** a
|
|
1107
|
+
pattern match and replace. It will **NOT** evaluate the code nor will PSR understand
|
|
1108
|
+
any internal object structures (ie. ``file:object.version`` will not work).
|
|
1109
|
+
|
|
1110
|
+
.. important::
|
|
1111
|
+
The Regular Expression expects a version value to exist in the file to be replaced.
|
|
1112
|
+
It cannot be an empty string or a non-semver compliant string. If this is the very
|
|
1113
|
+
first time you are using PSR, we recommend you set the version to ``0.0.0``. This
|
|
1114
|
+
may become more flexible in the future with resolution of issue `#941`_.
|
|
1115
|
+
|
|
1116
|
+
.. _#941: https://github.com/python-semantic-release/python-semantic-release/issues/941
|
|
1117
|
+
|
|
1118
|
+
Given the pattern matching nature of this feature, the Regular Expression is able to
|
|
1119
|
+
support most file formats as a variable declaration in most languages is very similar.
|
|
1120
|
+
We specifically support Python, YAML, and JSON as these have been the most common
|
|
1121
|
+
requests. This configuration option will also work regardless of file extension
|
|
1122
|
+
because its only a pattern match.
|
|
1123
|
+
|
|
1124
|
+
.. note::
|
|
1125
|
+
This will also work for TOML but we recommend using :ref:`config-version_toml` for
|
|
1126
|
+
TOML files as it actually will interpret the TOML file and replace the version
|
|
1127
|
+
number before writing the file back to disk.
|
|
1128
|
+
|
|
1129
|
+
.. warning::
|
|
1130
|
+
If the file (ex. JSON) you are replacing has two of the same variable name in it,
|
|
1131
|
+
this pattern match will not be able to differentiate between the two and will replace
|
|
1132
|
+
both. This is a limitation of the pattern matching and not a bug.
|
|
1133
|
+
|
|
1105
1134
|
**Default:** ``[]``
|
|
@@ -131,7 +131,7 @@ provide the following inputs:
|
|
|
131
131
|
- name: Python Semantic Release
|
|
132
132
|
# Adjust tag with desired version if applicable. Version shorthand
|
|
133
133
|
# is NOT available, e.g. vX or vX.X will not work.
|
|
134
|
-
uses: python-semantic-release/python-semantic-release@v9.8.
|
|
134
|
+
uses: python-semantic-release/python-semantic-release@v9.8.9
|
|
135
135
|
with:
|
|
136
136
|
# ... other options
|
|
137
137
|
force: "patch"
|
|
@@ -1,4 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
Python Semantic Release
|
|
2
|
+
***********************
|
|
3
|
+
|
|
4
|
+
|Ruff| |Test Status| |PyPI Version| |conda-forge version| |Read the Docs Status| |Pre-Commit Enabled|
|
|
5
|
+
|
|
6
|
+
Automatic Semantic Versioning for Python projects. This is a Python
|
|
7
|
+
implementation of `semantic-release`_ for JS by Stephan Bönnemann. If
|
|
8
|
+
you find this topic interesting you should check out his `talk from
|
|
9
|
+
JSConf Budapest`_.
|
|
10
|
+
|
|
11
|
+
The general idea is to be able to detect what the next version of the
|
|
12
|
+
project should be based on the commits. This tool will use that to
|
|
13
|
+
automate the whole release, upload to an artifact repository and post changelogs to
|
|
14
|
+
GitHub. You can run the tool on a CI service, or just run it locally.
|
|
15
|
+
|
|
16
|
+
Installation
|
|
17
|
+
============
|
|
18
|
+
|
|
19
|
+
::
|
|
20
|
+
|
|
21
|
+
python3 -m pip install python-semantic-release
|
|
22
|
+
semantic-release --help
|
|
23
|
+
|
|
24
|
+
Python Semantic Release is also available from `conda-forge`_ or as a `GitHub Action`_.
|
|
25
|
+
Read more about the setup and configuration in our `getting started guide`_.
|
|
26
|
+
|
|
27
|
+
.. _semantic-release: https://github.com/semantic-release/semantic-release
|
|
28
|
+
.. _talk from JSConf Budapest: https://www.youtube.com/watch?v=tc2UgG5L7WM
|
|
29
|
+
.. _getting started guide: https://python-semantic-release.readthedocs.io/en/latest/#getting-started
|
|
30
|
+
.. _GitHub Action: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
|
|
31
|
+
.. _conda-forge: https://anaconda.org/conda-forge/python-semantic-release
|
|
32
|
+
|
|
33
|
+
.. |Test Status| image:: https://img.shields.io/github/actions/workflow/status/python-semantic-release/python-semantic-release/main.yml?branch=master&label=Test%20Status&logo=github
|
|
34
|
+
:target: https://github.com/python-semantic-release/python-semantic-release/actions/workflows/main.yml
|
|
35
|
+
:alt: test-status
|
|
36
|
+
.. |PyPI Version| image:: https://img.shields.io/pypi/v/python-semantic-release?label=PyPI&logo=pypi
|
|
37
|
+
:target: https://pypi.org/project/python-semantic-release/
|
|
38
|
+
:alt: pypi
|
|
39
|
+
.. |conda-forge Version| image:: https://img.shields.io/conda/vn/conda-forge/python-semantic-release?logo=anaconda
|
|
40
|
+
:target: https://anaconda.org/conda-forge/python-semantic-release
|
|
41
|
+
:alt: conda-forge
|
|
42
|
+
.. |Read the Docs Status| image:: https://img.shields.io/readthedocs/python-semantic-release?label=Read%20the%20Docs&logo=Read%20the%20Docs
|
|
43
|
+
:target: https://python-semantic-release.readthedocs.io/en/latest/
|
|
44
|
+
:alt: docs
|
|
45
|
+
.. |Pre-Commit Enabled| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit
|
|
46
|
+
:target: https://github.com/pre-commit/pre-commit
|
|
47
|
+
:alt: pre-commit
|
|
48
|
+
.. |Ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
|
|
49
|
+
:target: https://github.com/astral-sh/ruff
|
|
50
|
+
:alt: Ruff
|
|
51
|
+
|
|
2
52
|
|
|
3
53
|
Documentation Contents
|
|
4
54
|
======================
|
|
@@ -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.9"
|
|
10
10
|
description = "Automatic Semantic Versioning for Python projects"
|
|
11
11
|
requires-python = ">=3.8"
|
|
12
12
|
license = { text = "MIT" }
|
|
@@ -59,6 +59,7 @@ docs = [
|
|
|
59
59
|
]
|
|
60
60
|
test = [
|
|
61
61
|
"coverage[toml] ~= 7.0",
|
|
62
|
+
"pyyaml ~= 6.0",
|
|
62
63
|
"pytest ~= 8.3",
|
|
63
64
|
"pytest-env ~= 1.0",
|
|
64
65
|
"pytest-xdist ~= 3.0",
|
|
@@ -73,10 +74,10 @@ test = [
|
|
|
73
74
|
dev = [
|
|
74
75
|
"pre-commit ~= 3.5",
|
|
75
76
|
"tox ~= 4.11",
|
|
76
|
-
"ruff == 0.
|
|
77
|
+
"ruff == 0.6.1"
|
|
77
78
|
]
|
|
78
79
|
mypy = [
|
|
79
|
-
"mypy == 1.
|
|
80
|
+
"mypy == 1.11.2",
|
|
80
81
|
"types-requests ~= 2.32.0",
|
|
81
82
|
]
|
|
82
83
|
|
|
@@ -86,8 +87,8 @@ env = [
|
|
|
86
87
|
]
|
|
87
88
|
addopts = [
|
|
88
89
|
# TO DEBUG in single process, swap auto to 0
|
|
89
|
-
"-nauto",
|
|
90
|
-
|
|
90
|
+
# "-nauto",
|
|
91
|
+
"-n0",
|
|
91
92
|
"-ra",
|
|
92
93
|
"--diff-symbols",
|
|
93
94
|
"--cache-clear",
|
|
@@ -376,6 +377,7 @@ logging_use_named_masks = true
|
|
|
376
377
|
commit_parser = "angular"
|
|
377
378
|
build_command = """
|
|
378
379
|
python -m scripts.bump_version_in_docs
|
|
380
|
+
git add docs/*
|
|
379
381
|
python -m pip install -e .[build]
|
|
380
382
|
python -m build .
|
|
381
383
|
"""
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: python-semantic-release
|
|
3
|
+
Version: 9.8.9
|
|
4
|
+
Summary: Automatic Semantic Versioning for Python projects
|
|
5
|
+
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: changelog, https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md
|
|
8
|
+
Project-URL: documentation, https://python-semantic-release.readthedocs.io
|
|
9
|
+
Project-URL: homepage, https://python-semantic-release.readthedocs.io
|
|
10
|
+
Project-URL: issues, https://github.com/python-semantic-release/python-semantic-release/issues
|
|
11
|
+
Project-URL: repository, http://github.com/python-semantic-release/python-semantic-release.git
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/x-rst
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
License-File: AUTHORS.rst
|
|
23
|
+
Requires-Dist: click~=8.0
|
|
24
|
+
Requires-Dist: click-option-group~=0.5
|
|
25
|
+
Requires-Dist: gitpython~=3.0
|
|
26
|
+
Requires-Dist: requests~=2.25
|
|
27
|
+
Requires-Dist: jinja2~=3.1
|
|
28
|
+
Requires-Dist: python-gitlab~=4.0
|
|
29
|
+
Requires-Dist: tomlkit~=0.11
|
|
30
|
+
Requires-Dist: dotty-dict~=1.3
|
|
31
|
+
Requires-Dist: importlib-resources~=6.0
|
|
32
|
+
Requires-Dist: pydantic~=2.0
|
|
33
|
+
Requires-Dist: rich~=13.0
|
|
34
|
+
Requires-Dist: shellingham~=1.5
|
|
35
|
+
Provides-Extra: build
|
|
36
|
+
Requires-Dist: build~=1.2; extra == "build"
|
|
37
|
+
Provides-Extra: docs
|
|
38
|
+
Requires-Dist: Sphinx~=6.0; extra == "docs"
|
|
39
|
+
Requires-Dist: sphinxcontrib-apidoc==0.5.0; extra == "docs"
|
|
40
|
+
Requires-Dist: sphinx-autobuild==2024.2.4; extra == "docs"
|
|
41
|
+
Requires-Dist: furo~=2024.1; extra == "docs"
|
|
42
|
+
Provides-Extra: test
|
|
43
|
+
Requires-Dist: coverage[toml]~=7.0; extra == "test"
|
|
44
|
+
Requires-Dist: pyyaml~=6.0; extra == "test"
|
|
45
|
+
Requires-Dist: pytest~=8.3; extra == "test"
|
|
46
|
+
Requires-Dist: pytest-env~=1.0; extra == "test"
|
|
47
|
+
Requires-Dist: pytest-xdist~=3.0; extra == "test"
|
|
48
|
+
Requires-Dist: pytest-mock~=3.0; extra == "test"
|
|
49
|
+
Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
|
|
50
|
+
Requires-Dist: pytest-cov~=5.0; extra == "test"
|
|
51
|
+
Requires-Dist: pytest-pretty~=1.2; extra == "test"
|
|
52
|
+
Requires-Dist: pytest-clarity~=1.0; extra == "test"
|
|
53
|
+
Requires-Dist: responses~=0.25.0; extra == "test"
|
|
54
|
+
Requires-Dist: requests-mock~=1.10; extra == "test"
|
|
55
|
+
Provides-Extra: dev
|
|
56
|
+
Requires-Dist: pre-commit~=3.5; extra == "dev"
|
|
57
|
+
Requires-Dist: tox~=4.11; extra == "dev"
|
|
58
|
+
Requires-Dist: ruff==0.6.1; extra == "dev"
|
|
59
|
+
Provides-Extra: mypy
|
|
60
|
+
Requires-Dist: mypy==1.11.2; extra == "mypy"
|
|
61
|
+
Requires-Dist: types-requests~=2.32.0; extra == "mypy"
|
|
62
|
+
|
|
63
|
+
Python Semantic Release
|
|
64
|
+
***********************
|
|
65
|
+
|
|
66
|
+
*Automating Releases via SemVer and Commit Message Conventions*
|
|
67
|
+
|
|
68
|
+
----
|
|
69
|
+
|
|
70
|
+
The official documentation for Python Semantic Release can be found at
|
|
71
|
+
`python-semantic-release.readthedocs.io`_.
|
|
72
|
+
|
|
73
|
+
GitHub Action
|
|
74
|
+
=============
|
|
75
|
+
|
|
76
|
+
When using the Python Semantic Release GitHub Action, it executes the command
|
|
77
|
+
``semantic-release version`` using `python-semantic-release`_.
|
|
78
|
+
|
|
79
|
+
The usage information and examples for this GitHub Action is available under
|
|
80
|
+
the `GitHub Actions section`_ of `python-semantic-release.readthedocs.io`_.
|
|
81
|
+
|
|
82
|
+
.. _python-semantic-release: https://pypi.org/project/python-semantic-release/
|
|
83
|
+
.. _python-semantic-release.readthedocs.io: https://python-semantic-release.readthedocs.io/en/latest/
|
|
84
|
+
.. _GitHub Actions section: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
|
|
@@ -111,6 +111,7 @@ tests/scenario/__init__.py
|
|
|
111
111
|
tests/scenario/test_next_version.py
|
|
112
112
|
tests/scenario/test_release_history.py
|
|
113
113
|
tests/scenario/test_template_render.py
|
|
114
|
+
tests/scenario/test_version_stamp.py
|
|
114
115
|
tests/unit/__init__.py
|
|
115
116
|
tests/unit/semantic_release/__init__.py
|
|
116
117
|
tests/unit/semantic_release/test_helpers.py
|
|
@@ -17,7 +17,7 @@ build~=1.2
|
|
|
17
17
|
[dev]
|
|
18
18
|
pre-commit~=3.5
|
|
19
19
|
tox~=4.11
|
|
20
|
-
ruff==0.
|
|
20
|
+
ruff==0.6.1
|
|
21
21
|
|
|
22
22
|
[docs]
|
|
23
23
|
Sphinx~=6.0
|
|
@@ -26,11 +26,12 @@ sphinx-autobuild==2024.2.4
|
|
|
26
26
|
furo~=2024.1
|
|
27
27
|
|
|
28
28
|
[mypy]
|
|
29
|
-
mypy==1.
|
|
29
|
+
mypy==1.11.2
|
|
30
30
|
types-requests~=2.32.0
|
|
31
31
|
|
|
32
32
|
[test]
|
|
33
33
|
coverage[toml]~=7.0
|
|
34
|
+
pyyaml~=6.0
|
|
34
35
|
pytest~=8.3
|
|
35
36
|
pytest-env~=1.0
|
|
36
37
|
pytest-xdist~=3.0
|
|
@@ -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",
|
|
@@ -219,19 +219,12 @@ def build_distributions(
|
|
|
219
219
|
"""
|
|
220
220
|
Run the build command to build the distributions.
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
build_command_env: Mapping[str, str] | None
|
|
227
|
-
The environment variables to use when running the build command
|
|
228
|
-
noop: bool
|
|
229
|
-
Whether or not to run the build command
|
|
230
|
-
|
|
231
|
-
Raises:
|
|
232
|
-
------
|
|
233
|
-
BuildDistributionsError: if the build command fails
|
|
222
|
+
:param build_command: The build command to run.
|
|
223
|
+
:param build_command_env: The environment variables to use when running the
|
|
224
|
+
build command.
|
|
225
|
+
:param noop: Whether or not to run the build command.
|
|
234
226
|
|
|
227
|
+
:raises: BuildDistributionsError: if the build command fails
|
|
235
228
|
"""
|
|
236
229
|
if not build_command:
|
|
237
230
|
rprint("[green]No build command specified, skipping")
|
{python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/cli/config.py
RENAMED
|
@@ -540,7 +540,18 @@ class RuntimeContext:
|
|
|
540
540
|
try:
|
|
541
541
|
path, variable = decl.split(":", maxsplit=1)
|
|
542
542
|
# VersionDeclarationABC handles path existence check
|
|
543
|
-
search_text =
|
|
543
|
+
search_text = str.join(
|
|
544
|
+
"",
|
|
545
|
+
[
|
|
546
|
+
# Supports optional matching quotations around variable name
|
|
547
|
+
# Negative lookbehind to ensure we don't match part of a variable name
|
|
548
|
+
f"""(?x)(?P<quote1>['"])?(?<![\\w.-]){variable}(?P=quote1)?""",
|
|
549
|
+
# Supports walrus, equals sign, or colon as assignment operator ignoring whitespace separation
|
|
550
|
+
r"\s*(:=|[:=])\s*",
|
|
551
|
+
# Supports optional matching quotations around version number of a SEMVER pattern
|
|
552
|
+
f"""(?P<quote2>['"])?(?P<version>{SEMVER_REGEX.pattern})(?P=quote2)?""",
|
|
553
|
+
],
|
|
554
|
+
)
|
|
544
555
|
pd = PatternVersionDeclaration(path, search_text)
|
|
545
556
|
except ValueError as exc:
|
|
546
557
|
log.exception("Invalid variable declaration %r", decl)
|
|
@@ -568,7 +579,12 @@ class RuntimeContext:
|
|
|
568
579
|
)
|
|
569
580
|
|
|
570
581
|
# changelog_file
|
|
571
|
-
|
|
582
|
+
# Must use absolute after resolve because windows does not resolve if the path does not exist
|
|
583
|
+
# which means it returns a relative path. So we force absolute to ensure path is complete
|
|
584
|
+
# for the next check of path matching
|
|
585
|
+
changelog_file = (
|
|
586
|
+
Path(raw.changelog.changelog_file).expanduser().resolve().absolute()
|
|
587
|
+
)
|
|
572
588
|
|
|
573
589
|
# Prevent path traversal attacks
|
|
574
590
|
if raw.repo_dir not in changelog_file.parents:
|
|
@@ -576,7 +592,12 @@ class RuntimeContext:
|
|
|
576
592
|
"Changelog file destination must be inside of the repository directory."
|
|
577
593
|
)
|
|
578
594
|
|
|
579
|
-
|
|
595
|
+
# Must use absolute after resolve because windows does not resolve if the path does not exist
|
|
596
|
+
# which means it returns a relative path. So we force absolute to ensure path is complete
|
|
597
|
+
# for the next check of path matching
|
|
598
|
+
template_dir = (
|
|
599
|
+
Path(raw.changelog.template_dir).expanduser().resolve().absolute()
|
|
600
|
+
)
|
|
580
601
|
|
|
581
602
|
# Prevent path traversal attacks
|
|
582
603
|
if raw.repo_dir not in template_dir.parents:
|
{python_semantic_release-9.8.7 → python_semantic_release-9.8.9}/semantic_release/hvcs/gitea.py
RENAMED
|
@@ -95,11 +95,9 @@ class Gitea(RemoteHvcsBase):
|
|
|
95
95
|
Ref: https://gitea.com/api/swagger#/repository/repoCreateRelease
|
|
96
96
|
|
|
97
97
|
:param tag: Tag to create release for
|
|
98
|
-
|
|
99
98
|
:param release_notes: The release notes for this version
|
|
100
|
-
|
|
101
99
|
:param prerelease: Whether or not this release should be specified as a
|
|
102
|
-
|
|
100
|
+
prerelease
|
|
103
101
|
|
|
104
102
|
:return: Whether the request succeeded
|
|
105
103
|
"""
|
|
@@ -181,6 +179,7 @@ class Gitea(RemoteHvcsBase):
|
|
|
181
179
|
Get a release by its tag name
|
|
182
180
|
https://gitea.com/api/swagger#/repository/repoGetReleaseByTag
|
|
183
181
|
:param tag: Tag to get release for
|
|
182
|
+
|
|
184
183
|
:return: ID of found release
|
|
185
184
|
"""
|
|
186
185
|
tag_endpoint = self.create_api_url(
|
|
@@ -206,6 +205,7 @@ class Gitea(RemoteHvcsBase):
|
|
|
206
205
|
https://gitea.com/api/swagger#/repository/repoEditRelease
|
|
207
206
|
:param id: ID of release to update
|
|
208
207
|
:param release_notes: The release notes for this version
|
|
208
|
+
|
|
209
209
|
:return: The ID of the release that was edited
|
|
210
210
|
"""
|
|
211
211
|
log.info("Updating release %s", release_id)
|
|
@@ -231,6 +231,7 @@ class Gitea(RemoteHvcsBase):
|
|
|
231
231
|
Post release changelog
|
|
232
232
|
:param version: The version number
|
|
233
233
|
:param changelog: The release notes for this version
|
|
234
|
+
|
|
234
235
|
:return: The status of the request
|
|
235
236
|
"""
|
|
236
237
|
log.info("Creating release for %s", tag)
|
|
@@ -274,6 +275,7 @@ class Gitea(RemoteHvcsBase):
|
|
|
274
275
|
:param release_id: ID of the release to upload to
|
|
275
276
|
:param file: Path of the file to upload
|
|
276
277
|
:param label: this parameter has no effect
|
|
278
|
+
|
|
277
279
|
:return: The status of the request
|
|
278
280
|
"""
|
|
279
281
|
url = self.asset_upload_url(release_id)
|
|
@@ -312,6 +314,7 @@ class Gitea(RemoteHvcsBase):
|
|
|
312
314
|
Upload distributions to a release
|
|
313
315
|
:param tag: Tag to upload for
|
|
314
316
|
:param path: Path to the dist directory
|
|
317
|
+
|
|
315
318
|
:return: The number of distributions successfully uploaded
|
|
316
319
|
"""
|
|
317
320
|
# Find the release corresponding to this tag
|