python-semantic-release 10.5.1__py3-none-any.whl → 10.5.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_semantic_release-10.5.1.dist-info → python_semantic_release-10.5.3.dist-info}/METADATA +1 -1
- {python_semantic_release-10.5.1.dist-info → python_semantic_release-10.5.3.dist-info}/RECORD +9 -9
- semantic_release/cli/commands/version.py +2 -0
- semantic_release/commit_parser/conventional/options_monorepo.py +26 -17
- semantic_release/gitproject.py +46 -2
- {python_semantic_release-10.5.1.dist-info → python_semantic_release-10.5.3.dist-info}/WHEEL +0 -0
- {python_semantic_release-10.5.1.dist-info → python_semantic_release-10.5.3.dist-info}/entry_points.txt +0 -0
- {python_semantic_release-10.5.1.dist-info → python_semantic_release-10.5.3.dist-info}/licenses/LICENSE +0 -0
- {python_semantic_release-10.5.1.dist-info → python_semantic_release-10.5.3.dist-info}/top_level.txt +0 -0
{python_semantic_release-10.5.1.dist-info → python_semantic_release-10.5.3.dist-info}/RECORD
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
python_semantic_release-10.5.
|
|
1
|
+
python_semantic_release-10.5.3.dist-info/licenses/LICENSE,sha256=NE85nszX252sdQdu0xgS9qwfYES0k8qS6gW3uO4jRGE,1083
|
|
2
2
|
semantic_release/__init__.py,sha256=tRJWhrn_dUt0QycXD2DoJSfEP5uwmxngH7jvbG2i-hA,1317
|
|
3
3
|
semantic_release/__main__.py,sha256=pksxr6g1vkKq98Q1lShsxG8tk55IMiSMHzAHKyFU5x0,1704
|
|
4
4
|
semantic_release/const.py,sha256=wInJR7vcOgT1ysm5VuJQ6lD_ZGYnCwRVKz7Uz3htQc4,861
|
|
5
5
|
semantic_release/enums.py,sha256=vrEw1UNRcNrFjPqOFnuUzfeoqKj0ChixVVlyk5fqbng,1744
|
|
6
6
|
semantic_release/errors.py,sha256=FyocaqHbRhux-iNmCf9nI7awyUaGKjG9_5C_QDvhEas,3399
|
|
7
|
-
semantic_release/gitproject.py,sha256=
|
|
7
|
+
semantic_release/gitproject.py,sha256=18jsD8YFsaKKqt_l5a0ccygIE_sOqvqf9FoEkJjyCkk,18584
|
|
8
8
|
semantic_release/globals.py,sha256=IBhBbhZr2jx8dmpySnnu9m9jOGYu9Yu-vqHvAGQxgnw,464
|
|
9
9
|
semantic_release/helpers.py,sha256=2uQXOiuiemiviVD52SH2FF6cn14p_gqvREeHvP7dexw,10012
|
|
10
10
|
semantic_release/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -25,7 +25,7 @@ semantic_release/cli/commands/changelog.py,sha256=wJfd4VVfrGnu2jnIpG25cdVcbXIX-E
|
|
|
25
25
|
semantic_release/cli/commands/generate_config.py,sha256=2xZOu3NpyhBp0pWr7d8ugKl_kjqQgpSsSMHq5wHTfrE,1699
|
|
26
26
|
semantic_release/cli/commands/main.py,sha256=u1zhkkvKCZ2TtUqjzvdFTe5UZsvfws_pjqqo6CY0bBo,4351
|
|
27
27
|
semantic_release/cli/commands/publish.py,sha256=CE_LJTxFnc337MfpsfdJopi7QCwwE13GqGNQ-dNgWis,2871
|
|
28
|
-
semantic_release/cli/commands/version.py,sha256=
|
|
28
|
+
semantic_release/cli/commands/version.py,sha256=8pn21AskKRMg1WJJXNNTZzlS1bNZefHKOPDRe-3NF5M,29502
|
|
29
29
|
semantic_release/commit_parser/__init__.py,sha256=uCC2YI-EDPUAa6TwWYJA8TS7baWE2bXrLEGcrhJKofI,1323
|
|
30
30
|
semantic_release/commit_parser/_base.py,sha256=DLsHnbXG-39JkUbcnsBCSV2GmV35w1rasyoMhK8G0UE,3058
|
|
31
31
|
semantic_release/commit_parser/angular.py,sha256=MY_fo9F4EZ-ac8wYzBR0uD94O5Li2D-8zEMR01wss4c,18534
|
|
@@ -36,7 +36,7 @@ semantic_release/commit_parser/token.py,sha256=1_q8mJ4SRu7kNfa-Nxr8fEyuvCfjPgiPE
|
|
|
36
36
|
semantic_release/commit_parser/util.py,sha256=hcLjc16o7l6y_5Hfl8IxmF4ijaJD62JdjdB2DJWAe-g,3959
|
|
37
37
|
semantic_release/commit_parser/conventional/__init__.py,sha256=JHPL3S6trM4Le9MXnXc6iPYxxQnE4j0LG83_BWIomOw,602
|
|
38
38
|
semantic_release/commit_parser/conventional/options.py,sha256=AnRgTRMF-3X5QonTqq6bqJEbmGgQBzppyRZ79hct28g,2598
|
|
39
|
-
semantic_release/commit_parser/conventional/options_monorepo.py,sha256=
|
|
39
|
+
semantic_release/commit_parser/conventional/options_monorepo.py,sha256=ZEKhhsHbP8fgg0XSluZK27itbNkznslkCkyTi6aQJ3Q,3485
|
|
40
40
|
semantic_release/commit_parser/conventional/parser.py,sha256=Pex26cvMqAKx9NPH3KROYg7k76R0Nsbs4aHor5SbMZg,16671
|
|
41
41
|
semantic_release/commit_parser/conventional/parser_monorepo.py,sha256=nVAc_gK4tJ5UM_rd9KbXgBWeBgrI_q2-vav3_4748r8,21189
|
|
42
42
|
semantic_release/data/templates/conventional/md/.release_notes.md.j2,sha256=DlMVAJMGqE27TwJ-2kviYaFhd3uWqXiU6Ikl15Ukne8,2512
|
|
@@ -77,8 +77,8 @@ semantic_release/version/declarations/enum.py,sha256=3n5Py9DoFkmItIdsmtQrJgmAhep
|
|
|
77
77
|
semantic_release/version/declarations/i_version_replacer.py,sha256=oP6BxJuxwI44roI6448tomShv1sMoy9ry8TlhhIQtfc,2416
|
|
78
78
|
semantic_release/version/declarations/pattern.py,sha256=sKk0uQpJjWVZc8RJUjxQoEPUvFLxXNGGBow5h1IqCTM,8378
|
|
79
79
|
semantic_release/version/declarations/toml.py,sha256=2K4DtX5Qq1iHT8cG8mISPTMmp50w6Av0KmLAKZPYqq8,4931
|
|
80
|
-
python_semantic_release-10.5.
|
|
81
|
-
python_semantic_release-10.5.
|
|
82
|
-
python_semantic_release-10.5.
|
|
83
|
-
python_semantic_release-10.5.
|
|
84
|
-
python_semantic_release-10.5.
|
|
80
|
+
python_semantic_release-10.5.3.dist-info/METADATA,sha256=XFvZTTkpyX9iO4fzsBv6XBqN-_qxjLf3eC3Rr9ZFbGQ,4064
|
|
81
|
+
python_semantic_release-10.5.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
82
|
+
python_semantic_release-10.5.3.dist-info/entry_points.txt,sha256=kzkCyDJsMOwgpFwEWKE9wxN1tXaUP6g6GIO4xtc0QuE,162
|
|
83
|
+
python_semantic_release-10.5.3.dist-info/top_level.txt,sha256=qYA24nyg3eP-ti5UW7Vuj2aXVmM0wqVHx4mREdRZNAA,17
|
|
84
|
+
python_semantic_release-10.5.3.dist-info/RECORD,,
|
|
@@ -722,6 +722,7 @@ def version( # noqa: C901
|
|
|
722
722
|
)
|
|
723
723
|
except GitCommitEmptyIndexError:
|
|
724
724
|
logger.info("No local changes to add to any commit, skipping")
|
|
725
|
+
commit_changes = False
|
|
725
726
|
|
|
726
727
|
# Tag the version after potentially creating a new HEAD commit.
|
|
727
728
|
# This way if no source code is modified, i.e. all metadata updates
|
|
@@ -752,6 +753,7 @@ def version( # noqa: C901
|
|
|
752
753
|
project.verify_upstream_unchanged(
|
|
753
754
|
local_ref="HEAD~1",
|
|
754
755
|
upstream_ref=config.remote.name,
|
|
756
|
+
remote_url=remote_url,
|
|
755
757
|
noop=opts.noop,
|
|
756
758
|
)
|
|
757
759
|
except UpstreamBranchChangedError as exc:
|
|
@@ -43,37 +43,46 @@ class ConventionalCommitMonorepoParserOptions(ConventionalCommitParserOptions):
|
|
|
43
43
|
to match them literally.
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
|
-
@classmethod
|
|
47
46
|
@field_validator("path_filters", mode="before")
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
@classmethod
|
|
48
|
+
def convert_strs_to_paths(cls, value: Any) -> tuple[str, ...]:
|
|
49
|
+
if isinstance(value, str):
|
|
50
|
+
return (value,)
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
results.append(Path(val))
|
|
55
|
-
continue
|
|
52
|
+
if isinstance(value, Path):
|
|
53
|
+
return (str(value),)
|
|
56
54
|
|
|
57
|
-
|
|
55
|
+
if isinstance(value, Iterable):
|
|
56
|
+
results: list[str] = []
|
|
57
|
+
for val in value:
|
|
58
|
+
if isinstance(val, (str, Path)):
|
|
59
|
+
results.append(str(Path(val)))
|
|
60
|
+
continue
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
msg = f"Invalid type: {type(val)}, expected str or Path."
|
|
63
|
+
raise TypeError(msg)
|
|
64
|
+
|
|
65
|
+
return tuple(results)
|
|
66
|
+
|
|
67
|
+
msg = f"Invalid type: {type(value)}, expected str, Path, or Iterable."
|
|
68
|
+
raise TypeError(msg)
|
|
60
69
|
|
|
61
|
-
@classmethod
|
|
62
70
|
@field_validator("path_filters", mode="after")
|
|
63
|
-
|
|
71
|
+
@classmethod
|
|
72
|
+
def resolve_path(cls, dir_path_strs: tuple[str, ...]) -> tuple[str, ...]:
|
|
64
73
|
return tuple(
|
|
65
74
|
(
|
|
66
|
-
|
|
75
|
+
f"!{Path(str_path[1:]).expanduser().absolute().resolve()}"
|
|
67
76
|
# maintains the negation prefix if it exists
|
|
68
|
-
if
|
|
77
|
+
if str_path.startswith("!")
|
|
69
78
|
# otherwise, resolve the path normally
|
|
70
|
-
else
|
|
79
|
+
else str(Path(str_path).expanduser().absolute().resolve())
|
|
71
80
|
)
|
|
72
|
-
for
|
|
81
|
+
for str_path in dir_path_strs
|
|
73
82
|
)
|
|
74
83
|
|
|
75
|
-
@classmethod
|
|
76
84
|
@field_validator("scope_prefix", mode="after")
|
|
85
|
+
@classmethod
|
|
77
86
|
def validate_scope_prefix(cls, scope_prefix: str) -> str:
|
|
78
87
|
if not scope_prefix:
|
|
79
88
|
return ""
|
semantic_release/gitproject.py
CHANGED
|
@@ -336,13 +336,18 @@ class GitProject:
|
|
|
336
336
|
raise GitPushError(f"Failed to push tag ({tag}) to remote") from err
|
|
337
337
|
|
|
338
338
|
def verify_upstream_unchanged( # noqa: C901
|
|
339
|
-
self,
|
|
339
|
+
self,
|
|
340
|
+
local_ref: str = "HEAD",
|
|
341
|
+
upstream_ref: str = "origin",
|
|
342
|
+
remote_url: str | None = None,
|
|
343
|
+
noop: bool = False,
|
|
340
344
|
) -> None:
|
|
341
345
|
"""
|
|
342
346
|
Verify that the upstream branch has not changed since the given local reference.
|
|
343
347
|
|
|
344
348
|
:param local_ref: The local reference to compare against upstream (default: HEAD)
|
|
345
349
|
:param upstream_ref: The name of the upstream remote or specific remote branch (default: origin)
|
|
350
|
+
:param remote_url: Optional authenticated remote URL to use for fetching (default: None, uses configured remote)
|
|
346
351
|
:param noop: Whether to skip the actual verification (for dry-run mode)
|
|
347
352
|
|
|
348
353
|
:raises UpstreamBranchChangedError: If the upstream branch has changed
|
|
@@ -409,7 +414,46 @@ class GitProject:
|
|
|
409
414
|
# Fetch the latest changes from the remote
|
|
410
415
|
self.logger.info("Fetching latest changes from remote '%s'", remote_name)
|
|
411
416
|
try:
|
|
412
|
-
|
|
417
|
+
# Check if we should use authenticated URL for fetch
|
|
418
|
+
# Only use remote_url if:
|
|
419
|
+
# 1. It's provided and different from the configured remote URL
|
|
420
|
+
# 2. It contains authentication credentials (@ symbol)
|
|
421
|
+
# 3. The configured remote is NOT a local path, file:// URL, or test URL (example.com)
|
|
422
|
+
# This ensures we don't break tests or local development
|
|
423
|
+
configured_url = remote_ref_obj.url
|
|
424
|
+
is_local_or_test_remote = (
|
|
425
|
+
configured_url.startswith(("file://", "/", "C:/", "H:/"))
|
|
426
|
+
or "example.com" in configured_url
|
|
427
|
+
or not configured_url.startswith(
|
|
428
|
+
(
|
|
429
|
+
"https://",
|
|
430
|
+
"http://",
|
|
431
|
+
"git://",
|
|
432
|
+
"git@",
|
|
433
|
+
"ssh://",
|
|
434
|
+
"git+ssh://",
|
|
435
|
+
)
|
|
436
|
+
)
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
use_authenticated_fetch = (
|
|
440
|
+
remote_url
|
|
441
|
+
and "@" in remote_url
|
|
442
|
+
and remote_url != configured_url
|
|
443
|
+
and not is_local_or_test_remote
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
if use_authenticated_fetch:
|
|
447
|
+
# Use authenticated remote URL for fetch
|
|
448
|
+
# Fetch the remote branch and update the local tracking ref
|
|
449
|
+
repo.git.fetch(
|
|
450
|
+
remote_url,
|
|
451
|
+
f"refs/heads/{remote_branch_name}:refs/remotes/{upstream_full_ref_name}",
|
|
452
|
+
)
|
|
453
|
+
else:
|
|
454
|
+
# Use the default remote configuration for local paths,
|
|
455
|
+
# file:// URLs, test URLs, or when no authentication is needed
|
|
456
|
+
remote_ref_obj.fetch()
|
|
413
457
|
except GitCommandError as err:
|
|
414
458
|
self.logger.exception(str(err))
|
|
415
459
|
err_msg = f"Failed to fetch from remote '{remote_name}'"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_semantic_release-10.5.1.dist-info → python_semantic_release-10.5.3.dist-info}/top_level.txt
RENAMED
|
File without changes
|