python-semantic-release 8.5.0__tar.gz → 8.5.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.
Files changed (58) hide show
  1. {python-semantic-release-8.5.0/python_semantic_release.egg-info → python-semantic-release-8.5.1}/PKG-INFO +1 -1
  2. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/pyproject.toml +1 -1
  3. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1/python_semantic_release.egg-info}/PKG-INFO +1 -1
  4. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/__init__.py +1 -1
  5. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/commands/version.py +19 -2
  6. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/config.py +11 -1
  7. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/AUTHORS.rst +0 -0
  8. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/LICENSE +0 -0
  9. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/MANIFEST.in +0 -0
  10. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/README.rst +0 -0
  11. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/python_semantic_release.egg-info/SOURCES.txt +0 -0
  12. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/python_semantic_release.egg-info/dependency_links.txt +0 -0
  13. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/python_semantic_release.egg-info/entry_points.txt +0 -0
  14. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/python_semantic_release.egg-info/requires.txt +0 -0
  15. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/python_semantic_release.egg-info/top_level.txt +0 -0
  16. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/__main__.py +0 -0
  17. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/changelog/__init__.py +0 -0
  18. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/changelog/context.py +0 -0
  19. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/changelog/release_history.py +0 -0
  20. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/changelog/template.py +0 -0
  21. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/__init__.py +0 -0
  22. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/commands/__init__.py +0 -0
  23. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/commands/changelog.py +0 -0
  24. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/commands/generate_config.py +0 -0
  25. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/commands/main.py +0 -0
  26. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/commands/publish.py +0 -0
  27. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/common.py +0 -0
  28. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/const.py +0 -0
  29. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/github_actions_output.py +0 -0
  30. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/masking_filter.py +0 -0
  31. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/cli/util.py +0 -0
  32. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/commit_parser/__init__.py +0 -0
  33. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/commit_parser/_base.py +0 -0
  34. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/commit_parser/angular.py +0 -0
  35. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/commit_parser/emoji.py +0 -0
  36. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/commit_parser/scipy.py +0 -0
  37. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/commit_parser/tag.py +0 -0
  38. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/commit_parser/token.py +0 -0
  39. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/commit_parser/util.py +0 -0
  40. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/const.py +0 -0
  41. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/data/templates/CHANGELOG.md.j2 +0 -0
  42. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/data/templates/release_notes.md.j2 +0 -0
  43. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/enums.py +0 -0
  44. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/errors.py +0 -0
  45. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/helpers.py +0 -0
  46. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/hvcs/__init__.py +0 -0
  47. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/hvcs/_base.py +0 -0
  48. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/hvcs/gitea.py +0 -0
  49. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/hvcs/github.py +0 -0
  50. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/hvcs/gitlab.py +0 -0
  51. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/hvcs/token_auth.py +0 -0
  52. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/hvcs/util.py +0 -0
  53. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/version/__init__.py +0 -0
  54. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/version/algorithm.py +0 -0
  55. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/version/declaration.py +0 -0
  56. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/version/translator.py +0 -0
  57. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/semantic_release/version/version.py +0 -0
  58. {python-semantic-release-8.5.0 → python-semantic-release-8.5.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 8.5.0
3
+ Version: 8.5.1
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "8.5.0"
9
+ version = "8.5.1"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.7"
12
12
  license = { text = "MIT" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 8.5.0
3
+ Version: 8.5.1
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -23,7 +23,7 @@ from semantic_release.version import (
23
23
  tags_and_versions,
24
24
  )
25
25
 
26
- __version__ = "8.5.0"
26
+ __version__ = "8.5.1"
27
27
 
28
28
 
29
29
  def setup_hook(argv: list[str]) -> None:
@@ -9,6 +9,7 @@ from typing import TYPE_CHECKING, ContextManager, Iterable
9
9
 
10
10
  import click
11
11
  import shellingham # type: ignore[import]
12
+ from git.exc import GitCommandError
12
13
 
13
14
  from semantic_release.changelog import ReleaseHistory, environment, recursive_render
14
15
  from semantic_release.changelog.context import make_changelog_context
@@ -369,7 +370,15 @@ def version( # noqa: C901
369
370
  )
370
371
 
371
372
  elif commit_changes:
372
- repo.git.add(all_paths_to_add)
373
+ # TODO: in future this loop should be 1 line:
374
+ # repo.index.add(all_paths_to_add, force=False)
375
+ # but since 'force' is deliberally ineffective (as in docstring) in gitpython 3.1.18
376
+ # we have to do manually add each filepath, and catch the exception if it is an ignored file
377
+ for updated_path in all_paths_to_add:
378
+ try:
379
+ repo.git.add(updated_path)
380
+ except GitCommandError:
381
+ log.warning("Failed to add path (%s) to index", updated_path)
373
382
 
374
383
  rh = ReleaseHistory.from_git_history(
375
384
  repo=repo,
@@ -435,7 +444,15 @@ def version( # noqa: C901
435
444
  )
436
445
  elif commit_changes:
437
446
  # Anything changed here should be staged.
438
- repo.git.add(updated_paths)
447
+ # TODO: in future this loop should be 1 line:
448
+ # repo.index.add(updated_paths, force=False)
449
+ # but since 'force' is deliberally ineffective (as in docstring) in gitpython 3.1.18
450
+ # we have to do manually add each filepath, and catch the exception if it is an ignored file
451
+ for updated_path in updated_paths:
452
+ try:
453
+ repo.git.add(updated_path)
454
+ except GitCommandError:
455
+ log.warning("Failed to add path (%s) to index", updated_path)
439
456
 
440
457
  def custom_git_environment() -> ContextManager[None]:
441
458
  """
@@ -257,8 +257,18 @@ class RuntimeContext:
257
257
  ##
258
258
  # credentials masking for logging
259
259
  masker = MaskingFilter(_use_named_masks=raw.logging_use_named_masks)
260
+
261
+ try:
262
+ active_branch = repo.active_branch.name
263
+ except TypeError as err:
264
+ raise NotAReleaseBranch(
265
+ "Detached HEAD state cannot match any release groups; "
266
+ "no release will be made"
267
+ ) from err
268
+
260
269
  # branch-specific configuration
261
- branch_config = cls.select_branch_options(raw.branches, repo.active_branch.name)
270
+ branch_config = cls.select_branch_options(raw.branches, active_branch)
271
+
262
272
  # commit_parser
263
273
  commit_parser_cls = (
264
274
  _known_commit_parsers[raw.commit_parser]