python-semantic-release 9.7.3__tar.gz → 9.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_semantic_release-9.7.3/python_semantic_release.egg-info → python_semantic_release-9.8.1}/PKG-INFO +2 -2
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/configuration.rst +45 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/migrating_from_v7.rst +4 -4
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/pyproject.toml +2 -2
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1/python_semantic_release.egg-info}/PKG-INFO +2 -2
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/python_semantic_release.egg-info/requires.txt +1 -1
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/__init__.py +1 -1
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/commands/version.py +40 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/config.py +3 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/github.py +5 -4
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/gitlab.py +127 -27
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/command_line/test_version.py +180 -2
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/hvcs/test_gitlab.py +193 -43
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/AUTHORS.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/LICENSE +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/MANIFEST.in +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/README.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/Makefile +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/algorithm.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/automatic-releases/cronjobs.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/automatic-releases/github-actions.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/automatic-releases/index.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/automatic-releases/travis.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/changelog_templates.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/commands.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/commit-parsing.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/conf.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/contributing.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/contributors.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/github-action.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/index.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/make.bat +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/multibranch_releases.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/strict_mode.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/docs/troubleshooting.rst +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/python_semantic_release.egg-info/SOURCES.txt +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/python_semantic_release.egg-info/dependency_links.txt +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/python_semantic_release.egg-info/entry_points.txt +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/python_semantic_release.egg-info/top_level.txt +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/__main__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/changelog/context.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/changelog/release_history.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/changelog/template.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/commands/changelog.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/commands/cli_context.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/commands/main.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/commands/publish.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/common.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/const.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/github_actions_output.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/masking_filter.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/util.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/commit_parser/angular.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/commit_parser/emoji.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/commit_parser/scipy.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/commit_parser/tag.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/const.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/data/templates/CHANGELOG.md.j2 +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/data/templates/release_notes.md.j2 +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/enums.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/errors.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/helpers.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/_base.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/bitbucket.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/gitea.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/remote_hvcs_base.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/util.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/version/algorithm.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/version/declaration.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/version/translator.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/version/version.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/setup.cfg +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/command_line/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/command_line/conftest.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/command_line/test_changelog.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/command_line/test_generate_config.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/command_line/test_help.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/command_line/test_main.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/command_line/test_publish.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/conftest.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/const.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/commit_parsers.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/example_project.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/git_repo.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/github_flow/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/fixtures/scipy.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/scenario/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/scenario/test_next_version.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/scenario/test_release_history.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/scenario/test_template_render.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/cli/test_config.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/cli/test_util.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/cli/test_version.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/commit_parser/test_tag.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/version/test_declaration.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/unit/semantic_release/version/test_version.py +0 -0
- {python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/tests/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 9.
|
|
3
|
+
Version: 9.8.1
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -55,7 +55,7 @@ Requires-Dist: types-pytest-lazy-fixture~=0.6.3; extra == "test"
|
|
|
55
55
|
Provides-Extra: dev
|
|
56
56
|
Requires-Dist: pre-commit~=3.5; extra == "dev"
|
|
57
57
|
Requires-Dist: tox~=4.11; extra == "dev"
|
|
58
|
-
Requires-Dist: ruff==0.4.
|
|
58
|
+
Requires-Dist: ruff==0.4.4; extra == "dev"
|
|
59
59
|
Provides-Extra: mypy
|
|
60
60
|
Requires-Dist: mypy==1.10.0; extra == "mypy"
|
|
61
61
|
Requires-Dist: types-requests~=2.31.0; extra == "mypy"
|
|
@@ -207,6 +207,33 @@ PSR_DOCKER_GITHUB_ACTION Pass-through ``true`` if exists in process env, unset
|
|
|
207
207
|
VIRTUAL_ENV Pass-through ``VIRTUAL_ENV`` if exists in process env, unset otherwise
|
|
208
208
|
======================== ======================================================================
|
|
209
209
|
|
|
210
|
+
In addition, on windows systems these environment variables are passed:
|
|
211
|
+
======================== ======================================================================
|
|
212
|
+
Variable Name Description
|
|
213
|
+
======================== ======================================================================
|
|
214
|
+
ALLUSERSAPPDATA Pass-through ``ALLUSERAPPDATA`` if exists in process env, unset otherwise
|
|
215
|
+
ALLUSERSPROFILE Pass-through ``ALLUSERSPPPROFILE`` if exists in process env, unset otherwise
|
|
216
|
+
APPDATA Pass-through ``APPDATA`` if exists in process env, unset otherwise
|
|
217
|
+
COMMONPROGRAMFILES Pass-through ``COMMONPROGRAMFILES`` if exists in process env, unset otherwise
|
|
218
|
+
COMMONPROGRAMFILES(x86) Pass-through ``COMMONPROGRAMFILES(x86)`` if exists in process env, unset otherwise
|
|
219
|
+
DEFAULTUSERPROFILE Pass-through ``DEFAULTUSERPROFILE`` if exists in process env, unset otherwise
|
|
220
|
+
HOMEPATH Pass-through ``HOMEPATH`` if exists in process env, unset otherwise
|
|
221
|
+
PATHEXT Pass-through ``PATHEXT`` if exists in process env, unset otherwise
|
|
222
|
+
PROFILESFOLDER Pass-through ``PROFILESFOLDER`` if exists in process env, unset otherwise
|
|
223
|
+
PROGRAMFILES Pass-through ``PROGRAMFILES`` if exists in process env, unset otherwise
|
|
224
|
+
PROGRAMFILES(x86) Pass-through ``PROGRAMFILES(x86)`` if exists in process env, unset otherwise
|
|
225
|
+
SYSTEM Pass-through ``SYSTEM`` if exists in process env, unset otherwise
|
|
226
|
+
SYSTEM16 Pass-through ``SYSTEM16`` if exists in process env, unset otherwise
|
|
227
|
+
SYSTEM32 Pass-through ``SYSTEM32`` if exists in process env, unset otherwise
|
|
228
|
+
SYSTEMDRIVE Pass-through ``SYSTEMDRIVE`` if exists in process env, unset otherwise
|
|
229
|
+
SYSTEMROOT Pass-through ``SYSTEMROOT`` if exists in process env, unset otherwise
|
|
230
|
+
TEMP Pass-through ``TEMP`` if exists in process env, unset otherwise
|
|
231
|
+
TMP Pass-through ``TMP`` if exists in process env, unset otherwise
|
|
232
|
+
USERPROFILE Pass-through ``USERPROFILE`` if exists in process env, unset otherwise
|
|
233
|
+
USERSID Pass-through ``USERSID`` if exists in process env, unset otherwise
|
|
234
|
+
WINDIR Pass-through ``WINDIR`` if exists in process env, unset otherwise
|
|
235
|
+
======================== ======================================================================
|
|
236
|
+
|
|
210
237
|
**Default:** ``None`` (not specified)
|
|
211
238
|
|
|
212
239
|
----
|
|
@@ -702,6 +729,24 @@ When :ref:`config-allow_zero_version` is set to ``false``, this setting is ignor
|
|
|
702
729
|
|
|
703
730
|
----
|
|
704
731
|
|
|
732
|
+
.. _config-no_git_verify:
|
|
733
|
+
|
|
734
|
+
``no_git_verify``
|
|
735
|
+
"""""""""""""""""
|
|
736
|
+
|
|
737
|
+
**Type:** ``bool``
|
|
738
|
+
|
|
739
|
+
This flag is passed along to ``git`` upon performing a ``git commit`` during :ref:`cmd-version`.
|
|
740
|
+
|
|
741
|
+
When true, it will bypass any git hooks that are set for the repository when Python Semantic
|
|
742
|
+
Release makes a version commit. When false, the commit is performed as normal. This option
|
|
743
|
+
has no effect when there are not any git hooks configured nor when the ``--no-commit`` option
|
|
744
|
+
is passed.
|
|
745
|
+
|
|
746
|
+
**Default:** ``false``
|
|
747
|
+
|
|
748
|
+
----
|
|
749
|
+
|
|
705
750
|
.. _config-publish:
|
|
706
751
|
|
|
707
752
|
``publish``
|
|
@@ -74,7 +74,7 @@ GitHub Action:
|
|
|
74
74
|
on:
|
|
75
75
|
push:
|
|
76
76
|
branches:
|
|
77
|
-
-
|
|
77
|
+
- main
|
|
78
78
|
|
|
79
79
|
jobs:
|
|
80
80
|
release:
|
|
@@ -91,18 +91,18 @@ GitHub Action:
|
|
|
91
91
|
# This action uses Python Semantic Release v8
|
|
92
92
|
- name: Python Semantic Release
|
|
93
93
|
id: release
|
|
94
|
-
uses: python-semantic-release/python-semantic-release@v8.
|
|
94
|
+
uses: python-semantic-release/python-semantic-release@v8.7.0
|
|
95
95
|
with:
|
|
96
96
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
97
97
|
|
|
98
98
|
- name: Publish package distributions to PyPI
|
|
99
|
-
uses: pypa/gh-action-pypi-publish@
|
|
99
|
+
uses: pypa/gh-action-pypi-publish@v1
|
|
100
100
|
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
|
|
101
101
|
# See https://github.com/actions/runner/issues/1173
|
|
102
102
|
if: steps.release.outputs.released == 'true'
|
|
103
103
|
|
|
104
104
|
- name: Publish package distributions to GitHub Releases
|
|
105
|
-
uses: python-semantic-release/upload-to-gh-release@
|
|
105
|
+
uses: python-semantic-release/upload-to-gh-release@v8.7.0
|
|
106
106
|
if: steps.release.outputs.released == 'true'
|
|
107
107
|
with:
|
|
108
108
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "python-semantic-release"
|
|
9
|
-
version = "9.
|
|
9
|
+
version = "9.8.1"
|
|
10
10
|
description = "Automatic Semantic Versioning for Python projects"
|
|
11
11
|
requires-python = ">=3.8"
|
|
12
12
|
license = { text = "MIT" }
|
|
@@ -74,7 +74,7 @@ test = [
|
|
|
74
74
|
dev = [
|
|
75
75
|
"pre-commit ~= 3.5",
|
|
76
76
|
"tox ~= 4.11",
|
|
77
|
-
"ruff == 0.4.
|
|
77
|
+
"ruff == 0.4.4"
|
|
78
78
|
]
|
|
79
79
|
mypy = [
|
|
80
80
|
"mypy == 1.10.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 9.
|
|
3
|
+
Version: 9.8.1
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -55,7 +55,7 @@ Requires-Dist: types-pytest-lazy-fixture~=0.6.3; extra == "test"
|
|
|
55
55
|
Provides-Extra: dev
|
|
56
56
|
Requires-Dist: pre-commit~=3.5; extra == "dev"
|
|
57
57
|
Requires-Dist: tox~=4.11; extra == "dev"
|
|
58
|
-
Requires-Dist: ruff==0.4.
|
|
58
|
+
Requires-Dist: ruff==0.4.4; extra == "dev"
|
|
59
59
|
Provides-Extra: mypy
|
|
60
60
|
Requires-Dist: mypy==1.10.0; extra == "mypy"
|
|
61
61
|
Requires-Dist: types-requests~=2.31.0; extra == "mypy"
|
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
5
|
import subprocess
|
|
6
|
+
import sys
|
|
6
7
|
from contextlib import nullcontext
|
|
7
8
|
from datetime import datetime
|
|
8
9
|
from typing import TYPE_CHECKING
|
|
@@ -156,6 +157,40 @@ def shell(
|
|
|
156
157
|
)
|
|
157
158
|
|
|
158
159
|
|
|
160
|
+
def is_windows() -> bool:
|
|
161
|
+
return sys.platform == "win32"
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def get_windows_env() -> Mapping[str, str | None]:
|
|
165
|
+
return {
|
|
166
|
+
environment_variable: os.getenv(environment_variable, None)
|
|
167
|
+
for environment_variable in (
|
|
168
|
+
"ALLUSERSAPPDATA",
|
|
169
|
+
"ALLUSERSPROFILE",
|
|
170
|
+
"APPDATA",
|
|
171
|
+
"COMMONPROGRAMFILES",
|
|
172
|
+
"COMMONPROGRAMFILES(x86)",
|
|
173
|
+
"DEFAULTUSERPROFILE",
|
|
174
|
+
"HOMEPATH",
|
|
175
|
+
"PATHEXT",
|
|
176
|
+
"PROFILESFOLDER",
|
|
177
|
+
"PROGRAMFILES",
|
|
178
|
+
"PROGRAMFILES(x86)",
|
|
179
|
+
"SYSTEM",
|
|
180
|
+
"SYSTEM16",
|
|
181
|
+
"SYSTEM32",
|
|
182
|
+
"SYSTEMDRIVE",
|
|
183
|
+
"SYSTEMPROFILE",
|
|
184
|
+
"SYSTEMROOT",
|
|
185
|
+
"TEMP",
|
|
186
|
+
"TMP",
|
|
187
|
+
"USERPROFILE",
|
|
188
|
+
"USERSID",
|
|
189
|
+
"WINDIR",
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
159
194
|
@click.command(
|
|
160
195
|
short_help="Detect and apply a new version",
|
|
161
196
|
context_settings={
|
|
@@ -330,6 +365,7 @@ def version( # noqa: C901
|
|
|
330
365
|
commit_author = runtime.commit_author
|
|
331
366
|
commit_message = runtime.commit_message
|
|
332
367
|
major_on_zero = runtime.major_on_zero
|
|
368
|
+
no_verify = runtime.no_git_verify
|
|
333
369
|
build_command = runtime.build_command
|
|
334
370
|
opts = runtime.global_cli_options
|
|
335
371
|
gha_output = VersionGitHubActionsOutput()
|
|
@@ -521,6 +557,8 @@ def version( # noqa: C901
|
|
|
521
557
|
"PATH": os.getenv("PATH", ""),
|
|
522
558
|
"HOME": os.getenv("HOME", None),
|
|
523
559
|
"VIRTUAL_ENV": os.getenv("VIRTUAL_ENV", None),
|
|
560
|
+
# Windows environment variables
|
|
561
|
+
**(get_windows_env() if is_windows() else {}),
|
|
524
562
|
# affects build decisions
|
|
525
563
|
"CI": os.getenv("CI", None),
|
|
526
564
|
# Identifies which CI environment
|
|
@@ -613,6 +651,7 @@ def version( # noqa: C901
|
|
|
613
651
|
)
|
|
614
652
|
|
|
615
653
|
command += f"git commit -m '{indented_commit_message}'"
|
|
654
|
+
command += "--no-verify" if no_verify else ""
|
|
616
655
|
|
|
617
656
|
noop_report(
|
|
618
657
|
indented(
|
|
@@ -628,6 +667,7 @@ def version( # noqa: C901
|
|
|
628
667
|
repo.git.commit(
|
|
629
668
|
m=commit_message.format(version=new_version),
|
|
630
669
|
date=int(commit_date.timestamp()),
|
|
670
|
+
no_verify=no_verify,
|
|
631
671
|
)
|
|
632
672
|
|
|
633
673
|
# Run the tagging after potentially creating a new HEAD commit.
|
{python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/cli/config.py
RENAMED
|
@@ -225,6 +225,7 @@ class RawConfig(BaseModel):
|
|
|
225
225
|
major_on_zero: bool = True
|
|
226
226
|
allow_zero_version: bool = True
|
|
227
227
|
remote: RemoteConfig = RemoteConfig()
|
|
228
|
+
no_git_verify: bool = False
|
|
228
229
|
tag_format: str = "v{version}"
|
|
229
230
|
publish: PublishConfig = PublishConfig()
|
|
230
231
|
version_toml: Optional[Tuple[str, ...]] = None
|
|
@@ -347,6 +348,7 @@ class RuntimeContext:
|
|
|
347
348
|
major_on_zero: bool
|
|
348
349
|
allow_zero_version: bool
|
|
349
350
|
prerelease: bool
|
|
351
|
+
no_git_verify: bool
|
|
350
352
|
assets: List[str]
|
|
351
353
|
commit_author: Actor
|
|
352
354
|
commit_message: str
|
|
@@ -596,6 +598,7 @@ class RuntimeContext:
|
|
|
596
598
|
upload_to_vcs_release=raw.publish.upload_to_vcs_release,
|
|
597
599
|
global_cli_options=global_cli_options,
|
|
598
600
|
masker=masker,
|
|
601
|
+
no_git_verify=raw.no_git_verify,
|
|
599
602
|
)
|
|
600
603
|
# credential masker
|
|
601
604
|
self.apply_log_masking(self.masker)
|
{python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/github.py
RENAMED
|
@@ -304,7 +304,7 @@ class Github(RemoteHvcsBase):
|
|
|
304
304
|
"""
|
|
305
305
|
Edit a release with updated change notes
|
|
306
306
|
https://docs.github.com/rest/reference/repos#update-a-release
|
|
307
|
-
:param
|
|
307
|
+
:param release_id: ID of release to update
|
|
308
308
|
:param release_notes: The release notes for this version
|
|
309
309
|
:return: The ID of the release that was edited
|
|
310
310
|
"""
|
|
@@ -329,8 +329,9 @@ class Github(RemoteHvcsBase):
|
|
|
329
329
|
) -> int:
|
|
330
330
|
"""
|
|
331
331
|
Post release changelog
|
|
332
|
-
:param
|
|
332
|
+
:param tag: The version number
|
|
333
333
|
:param release_notes: The release notes for this version
|
|
334
|
+
:param prerelease: Whether or not this release should be created as a prerelease
|
|
334
335
|
:return: The status of the request
|
|
335
336
|
"""
|
|
336
337
|
log.info("Creating release for %s", tag)
|
|
@@ -427,8 +428,8 @@ class Github(RemoteHvcsBase):
|
|
|
427
428
|
def upload_dists(self, tag: str, dist_glob: str) -> int:
|
|
428
429
|
"""
|
|
429
430
|
Upload distributions to a release
|
|
430
|
-
:param
|
|
431
|
-
:param
|
|
431
|
+
:param tag: Version to upload for
|
|
432
|
+
:param dist_glob: Path to the dist directory
|
|
432
433
|
:return: The number of distributions successfully uploaded
|
|
433
434
|
"""
|
|
434
435
|
# Find the release corresponding to this version
|
{python_semantic_release-9.7.3 → python_semantic_release-9.8.1}/semantic_release/hvcs/gitlab.py
RENAMED
|
@@ -9,14 +9,21 @@ from pathlib import PurePosixPath
|
|
|
9
9
|
from typing import TYPE_CHECKING
|
|
10
10
|
|
|
11
11
|
import gitlab
|
|
12
|
+
import gitlab.exceptions
|
|
13
|
+
import gitlab.v4
|
|
14
|
+
import gitlab.v4.objects
|
|
12
15
|
from urllib3.util.url import Url, parse_url
|
|
13
16
|
|
|
17
|
+
from semantic_release.errors import UnexpectedResponse
|
|
14
18
|
from semantic_release.helpers import logged_function
|
|
15
19
|
from semantic_release.hvcs.remote_hvcs_base import RemoteHvcsBase
|
|
20
|
+
from semantic_release.hvcs.util import suppress_not_found
|
|
16
21
|
|
|
17
22
|
if TYPE_CHECKING:
|
|
18
23
|
from typing import Any, Callable
|
|
19
24
|
|
|
25
|
+
from gitlab.v4.objects import Project as GitLabProject
|
|
26
|
+
|
|
20
27
|
|
|
21
28
|
log = logging.getLogger(__name__)
|
|
22
29
|
|
|
@@ -45,6 +52,8 @@ class Gitlab(RemoteHvcsBase):
|
|
|
45
52
|
) -> None:
|
|
46
53
|
super().__init__(remote_url)
|
|
47
54
|
self.token = token
|
|
55
|
+
self.project_namespace = f"{self.owner}/{self.repo_name}"
|
|
56
|
+
self._project: GitLabProject | None = None
|
|
48
57
|
|
|
49
58
|
domain_url = self._normalize_url(
|
|
50
59
|
hvcs_domain
|
|
@@ -63,8 +72,14 @@ class Gitlab(RemoteHvcsBase):
|
|
|
63
72
|
).url.rstrip("/")
|
|
64
73
|
)
|
|
65
74
|
|
|
66
|
-
self._client = gitlab.Gitlab(self.hvcs_domain.url)
|
|
67
|
-
self._api_url = parse_url(self._client.
|
|
75
|
+
self._client = gitlab.Gitlab(self.hvcs_domain.url, private_token=self.token)
|
|
76
|
+
self._api_url = parse_url(self._client.api_url)
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def project(self) -> GitLabProject:
|
|
80
|
+
if self._project is None:
|
|
81
|
+
self._project = self._client.projects.get(self.project_namespace)
|
|
82
|
+
return self._project
|
|
68
83
|
|
|
69
84
|
@lru_cache(maxsize=1)
|
|
70
85
|
def _get_repository_owner_and_name(self) -> tuple[str, str]:
|
|
@@ -87,61 +102,146 @@ class Gitlab(RemoteHvcsBase):
|
|
|
87
102
|
assets: list[str] | None = None, # noqa: ARG002
|
|
88
103
|
) -> str:
|
|
89
104
|
"""
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
:
|
|
93
|
-
|
|
94
|
-
|
|
105
|
+
Create a release in a remote VCS, adding any release notes and assets to it
|
|
106
|
+
|
|
107
|
+
Arguments:
|
|
108
|
+
---------
|
|
109
|
+
tag(str): The tag to create the release for
|
|
110
|
+
release_notes(str): The changelog description for this version only
|
|
111
|
+
prerelease(bool): This parameter has no effect in GitLab
|
|
112
|
+
assets(list[str]): A list of paths to files to upload as assets (TODO: not implemented)
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
-------
|
|
116
|
+
str: The tag of the release
|
|
117
|
+
|
|
118
|
+
Raises:
|
|
119
|
+
------
|
|
120
|
+
GitlabAuthenticationError: If authentication is not correct
|
|
121
|
+
GitlabCreateError: If the server cannot perform the request
|
|
122
|
+
|
|
95
123
|
"""
|
|
96
|
-
client = gitlab.Gitlab(self.hvcs_domain.url, private_token=self.token)
|
|
97
|
-
client.auth()
|
|
98
124
|
log.info("Creating release for %s", tag)
|
|
99
125
|
# ref: https://docs.gitlab.com/ee/api/releases/index.html#create-a-release
|
|
100
|
-
|
|
126
|
+
self.project.releases.create(
|
|
101
127
|
{
|
|
102
|
-
"name":
|
|
128
|
+
"name": tag,
|
|
103
129
|
"tag_name": tag,
|
|
130
|
+
"tag_message": tag,
|
|
104
131
|
"description": release_notes,
|
|
105
132
|
}
|
|
106
133
|
)
|
|
107
134
|
log.info("Successfully created release for %s", tag)
|
|
108
135
|
return tag
|
|
109
136
|
|
|
110
|
-
|
|
137
|
+
@logged_function(log)
|
|
138
|
+
@suppress_not_found
|
|
139
|
+
def get_release_by_tag(self, tag: str) -> gitlab.v4.objects.ProjectRelease | None:
|
|
140
|
+
"""
|
|
141
|
+
Get a release by its tag name
|
|
142
|
+
|
|
143
|
+
Arguments:
|
|
144
|
+
---------
|
|
145
|
+
tag(str): The tag name to get the release for
|
|
146
|
+
|
|
147
|
+
Returns:
|
|
148
|
+
-------
|
|
149
|
+
gitlab.v4.objects.ProjectRelease | None: The release object or None if not found
|
|
150
|
+
|
|
151
|
+
Raises:
|
|
152
|
+
------
|
|
153
|
+
gitlab.exceptions.GitlabAuthenticationError: If the user is not authenticated
|
|
154
|
+
|
|
155
|
+
"""
|
|
156
|
+
try:
|
|
157
|
+
return self.project.releases.get(tag)
|
|
158
|
+
except gitlab.exceptions.GitlabGetError:
|
|
159
|
+
log.debug("Release %s not found", tag)
|
|
160
|
+
return None
|
|
161
|
+
except KeyError as err:
|
|
162
|
+
raise UnexpectedResponse("JSON response is missing commit.id") from err
|
|
163
|
+
|
|
111
164
|
@logged_function(log)
|
|
112
165
|
def edit_release_notes( # type: ignore[override]
|
|
113
166
|
self,
|
|
114
|
-
|
|
167
|
+
release: gitlab.v4.objects.ProjectRelease,
|
|
115
168
|
release_notes: str,
|
|
116
169
|
) -> str:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
log.info("Updating release %s", release_id)
|
|
170
|
+
"""
|
|
171
|
+
Update the release notes for a given release
|
|
120
172
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
173
|
+
Arguments:
|
|
174
|
+
---------
|
|
175
|
+
release(gitlab.v4.objects.ProjectRelease): The release object to update
|
|
176
|
+
release_notes(str): The new release notes
|
|
177
|
+
|
|
178
|
+
Returns:
|
|
179
|
+
-------
|
|
180
|
+
str: The release id
|
|
181
|
+
|
|
182
|
+
Raises:
|
|
183
|
+
------
|
|
184
|
+
GitlabAuthenticationError: If authentication is not correct
|
|
185
|
+
GitlabUpdateError: If the server cannot perform the request
|
|
186
|
+
|
|
187
|
+
"""
|
|
188
|
+
log.info(
|
|
189
|
+
"Updating release %s [%s]",
|
|
190
|
+
release.name,
|
|
191
|
+
release.attributes.get("commit", {}).get("id"),
|
|
126
192
|
)
|
|
127
|
-
|
|
193
|
+
release.description = release_notes
|
|
194
|
+
release.save()
|
|
195
|
+
return str(release.get_id())
|
|
128
196
|
|
|
129
197
|
@logged_function(log)
|
|
130
198
|
def create_or_update_release(
|
|
131
199
|
self, tag: str, release_notes: str, prerelease: bool = False
|
|
132
200
|
) -> str:
|
|
201
|
+
"""
|
|
202
|
+
Create or update a release for the given tag in a remote VCS
|
|
203
|
+
|
|
204
|
+
Arguments:
|
|
205
|
+
---------
|
|
206
|
+
tag(str): The tag to create or update the release for
|
|
207
|
+
release_notes(str): The changelog description for this version only
|
|
208
|
+
prerelease(bool): This parameter has no effect in GitLab
|
|
209
|
+
|
|
210
|
+
Returns:
|
|
211
|
+
-------
|
|
212
|
+
str: The release id
|
|
213
|
+
|
|
214
|
+
Raises:
|
|
215
|
+
------
|
|
216
|
+
ValueError: If the release could not be created or updated
|
|
217
|
+
gitlab.exceptions.GitlabAuthenticationError: If the user is not authenticated
|
|
218
|
+
GitlabUpdateError: If the server cannot perform the request
|
|
219
|
+
|
|
220
|
+
"""
|
|
133
221
|
try:
|
|
134
222
|
return self.create_release(
|
|
135
223
|
tag=tag, release_notes=release_notes, prerelease=prerelease
|
|
136
224
|
)
|
|
137
225
|
except gitlab.GitlabCreateError:
|
|
138
226
|
log.info(
|
|
139
|
-
"
|
|
227
|
+
"New release %s could not be created for project %s",
|
|
140
228
|
tag,
|
|
141
|
-
self.
|
|
142
|
-
|
|
229
|
+
self.project_namespace,
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
if (release_obj := self.get_release_by_tag(tag)) is None:
|
|
233
|
+
raise ValueError(
|
|
234
|
+
f"release for tag {tag} could not be found, and could not be created"
|
|
143
235
|
)
|
|
144
|
-
|
|
236
|
+
|
|
237
|
+
log.debug(
|
|
238
|
+
"Found existing release commit %s, updating", release_obj.commit.get("id")
|
|
239
|
+
)
|
|
240
|
+
# If this errors we let it die
|
|
241
|
+
return self.edit_release_notes(
|
|
242
|
+
release=release_obj,
|
|
243
|
+
release_notes=release_notes,
|
|
244
|
+
)
|
|
145
245
|
|
|
146
246
|
def remote_url(self, use_token: bool = True) -> str:
|
|
147
247
|
"""Get the remote url including the token for authentication if requested"""
|
|
@@ -150,7 +250,7 @@ class Gitlab(RemoteHvcsBase):
|
|
|
150
250
|
|
|
151
251
|
return self.create_server_url(
|
|
152
252
|
auth=f"gitlab-ci-token:{self.token}",
|
|
153
|
-
path=f"{self.
|
|
253
|
+
path=f"{self.project_namespace}.git",
|
|
154
254
|
)
|
|
155
255
|
|
|
156
256
|
def compare_url(self, from_rev: str, to_rev: str) -> str:
|