python-semantic-release 10.3.1__py3-none-any.whl → 10.3.2__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.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/METADATA +2 -2
- {python_semantic_release-10.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/RECORD +9 -9
- semantic_release/cli/commands/version.py +3 -6
- semantic_release/cli/github_actions_output.py +8 -2
- semantic_release/version/algorithm.py +5 -18
- {python_semantic_release-10.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/WHEEL +0 -0
- {python_semantic_release-10.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/entry_points.txt +0 -0
- {python_semantic_release-10.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/licenses/LICENSE +0 -0
- {python_semantic_release-10.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/top_level.txt +0 -0
{python_semantic_release-10.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-semantic-release
|
|
3
|
-
Version: 10.3.
|
|
3
|
+
Version: 10.3.2
|
|
4
4
|
Summary: Automatic Semantic Versioning for Python projects
|
|
5
5
|
Author-email: Rolf Erik Lekang <me@rolflekang.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
Requires-Python:
|
|
20
|
+
Requires-Python: ~=3.8
|
|
21
21
|
Description-Content-Type: text/x-rst
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: click~=8.1.0
|
{python_semantic_release-10.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
python_semantic_release-10.3.
|
|
1
|
+
python_semantic_release-10.3.2.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
|
|
@@ -17,7 +17,7 @@ semantic_release/cli/changelog_writer.py,sha256=2jP5b0LK61Y2tb22GQSFFmwHwXd2Wjbo
|
|
|
17
17
|
semantic_release/cli/cli_context.py,sha256=Nop71LdVCJOeSUHgTXunMyK3xAu_QKQC2cRp1QBVkX0,4134
|
|
18
18
|
semantic_release/cli/config.py,sha256=4UCx4-jzKpggb7dZM3fnZoi8rPiUGWtEmLiCfWlro7I,33458
|
|
19
19
|
semantic_release/cli/const.py,sha256=h7XE2D0D__TAZSrUUtVszwvzpkHTMOiQCf97XQNbEvA,163
|
|
20
|
-
semantic_release/cli/github_actions_output.py,sha256=
|
|
20
|
+
semantic_release/cli/github_actions_output.py,sha256=yC0nsMvEFGACjDwB8DdmGKwNGI8aIIhDxRHrmcS7tzA,5410
|
|
21
21
|
semantic_release/cli/masking_filter.py,sha256=GsTyaoZbUVJLXVMqeXhCttXK84UnBQ8cNDSHxd52sOc,3218
|
|
22
22
|
semantic_release/cli/util.py,sha256=4rf4xDHb7l-XpdcFNtslFz1xHslnBu6cTgWHXVnQXQs,3746
|
|
23
23
|
semantic_release/cli/commands/__init__.py,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=CwFwoBP896Y9dc_p5bAyjZFbuD78tCS-q5IueQsOVSU,26634
|
|
29
29
|
semantic_release/commit_parser/__init__.py,sha256=6euiDgj9bwOx1rP96vUjq090usviXkbo7OVOnRBGfcw,742
|
|
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
|
|
@@ -64,7 +64,7 @@ semantic_release/hvcs/remote_hvcs_base.py,sha256=QtkjdMy9l-c7UOtyPz25cqVOkCk4IU-
|
|
|
64
64
|
semantic_release/hvcs/token_auth.py,sha256=ZjT56-NIPB4OKIt1qwHCu1TavXnrWFIBl9ARlg56hgU,663
|
|
65
65
|
semantic_release/hvcs/util.py,sha256=PUNV4yUlpzDtNCFmh2joaPdU4JyfUBnVp0zaQsT9EDQ,2871
|
|
66
66
|
semantic_release/version/__init__.py,sha256=CLhtGQry9dLIij5XyRa9ZevxU_1p8tjMTSQ-K_GMpWM,270
|
|
67
|
-
semantic_release/version/algorithm.py,sha256=
|
|
67
|
+
semantic_release/version/algorithm.py,sha256=IxgYNF78W7qdMzdV4WsoljwfJgB-sn2XdfkevD0aZlo,16254
|
|
68
68
|
semantic_release/version/declaration.py,sha256=eot_lUyFaEhzK4bPncfv9tahf51LdxZP6EaS54h3aAs,3635
|
|
69
69
|
semantic_release/version/translator.py,sha256=LjmsMHWJJOG8ES6lRhjQsP2t8pmw4Ux1XVYzvROMR_M,3047
|
|
70
70
|
semantic_release/version/version.py,sha256=3QlPKsrmNnFH71GlsYvpI-WwhpkJEs_JrDBbMaepwJY,14183
|
|
@@ -73,8 +73,8 @@ semantic_release/version/declarations/enum.py,sha256=3n5Py9DoFkmItIdsmtQrJgmAhep
|
|
|
73
73
|
semantic_release/version/declarations/i_version_replacer.py,sha256=oP6BxJuxwI44roI6448tomShv1sMoy9ry8TlhhIQtfc,2416
|
|
74
74
|
semantic_release/version/declarations/pattern.py,sha256=MpUmsHYGAVAuFSKSb29FLcWeUCEHG_TRyhMO-2DWAAs,8308
|
|
75
75
|
semantic_release/version/declarations/toml.py,sha256=2K4DtX5Qq1iHT8cG8mISPTMmp50w6Av0KmLAKZPYqq8,4931
|
|
76
|
-
python_semantic_release-10.3.
|
|
77
|
-
python_semantic_release-10.3.
|
|
78
|
-
python_semantic_release-10.3.
|
|
79
|
-
python_semantic_release-10.3.
|
|
80
|
-
python_semantic_release-10.3.
|
|
76
|
+
python_semantic_release-10.3.2.dist-info/METADATA,sha256=Hvdc-N4cJe-GX8gGtD08rfqjASK0I93EaYxuCU6pNK4,3927
|
|
77
|
+
python_semantic_release-10.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
78
|
+
python_semantic_release-10.3.2.dist-info/entry_points.txt,sha256=kzkCyDJsMOwgpFwEWKE9wxN1tXaUP6g6GIO4xtc0QuE,162
|
|
79
|
+
python_semantic_release-10.3.2.dist-info/top_level.txt,sha256=qYA24nyg3eP-ti5UW7Vuj2aXVmM0wqVHx4mREdRZNAA,17
|
|
80
|
+
python_semantic_release-10.3.2.dist-info/RECORD,,
|
|
@@ -471,11 +471,7 @@ def version( # noqa: C901
|
|
|
471
471
|
no_verify = runtime.no_git_verify
|
|
472
472
|
opts = runtime.global_cli_options
|
|
473
473
|
gha_output = VersionGitHubActionsOutput(
|
|
474
|
-
gh_client=(
|
|
475
|
-
hvcs_client
|
|
476
|
-
if isinstance(hvcs_client, Github)
|
|
477
|
-
else Github(hvcs_client.remote_url(use_token=False))
|
|
478
|
-
),
|
|
474
|
+
gh_client=hvcs_client if isinstance(hvcs_client, Github) else None,
|
|
479
475
|
mode=(
|
|
480
476
|
PersistenceMode.TEMPORARY
|
|
481
477
|
if opts.noop or (not commit_changes and not create_tag)
|
|
@@ -553,7 +549,8 @@ def version( # noqa: C901
|
|
|
553
549
|
|
|
554
550
|
# Update GitHub Actions output value with new version & set delayed write
|
|
555
551
|
gha_output.version = new_version
|
|
556
|
-
|
|
552
|
+
if isinstance(hvcs_client, Github):
|
|
553
|
+
ctx.call_on_close(gha_output.write_if_possible)
|
|
557
554
|
|
|
558
555
|
# Make string variant of version or appropriate tag as necessary
|
|
559
556
|
version_to_print = str(new_version) if not print_only_tag else new_version.as_tag()
|
|
@@ -24,7 +24,7 @@ class VersionGitHubActionsOutput:
|
|
|
24
24
|
|
|
25
25
|
def __init__(
|
|
26
26
|
self,
|
|
27
|
-
gh_client: Github,
|
|
27
|
+
gh_client: Github | None = None,
|
|
28
28
|
mode: PersistenceMode = PersistenceMode.PERMANENT,
|
|
29
29
|
released: bool | None = None,
|
|
30
30
|
version: Version | None = None,
|
|
@@ -106,6 +106,12 @@ class VersionGitHubActionsOutput:
|
|
|
106
106
|
raise TypeError("output 'prev_version' should be a Version")
|
|
107
107
|
self._prev_version = value
|
|
108
108
|
|
|
109
|
+
@property
|
|
110
|
+
def gh_client(self) -> Github:
|
|
111
|
+
if not self._gh_client:
|
|
112
|
+
raise ValueError("GitHub client not set, cannot create links")
|
|
113
|
+
return self._gh_client
|
|
114
|
+
|
|
109
115
|
def to_output_text(self) -> str:
|
|
110
116
|
missing: set[str] = set()
|
|
111
117
|
if self.version is None:
|
|
@@ -128,7 +134,7 @@ class VersionGitHubActionsOutput:
|
|
|
128
134
|
"version": str(self.version),
|
|
129
135
|
"tag": self.tag,
|
|
130
136
|
"is_prerelease": str(self.is_prerelease).lower(),
|
|
131
|
-
"link": self.
|
|
137
|
+
"link": self.gh_client.create_release_url(self.tag) if self.tag else "",
|
|
132
138
|
"previous_version": str(self.prev_version) if self.prev_version else "",
|
|
133
139
|
"commit_sha": self.commit_sha if self.commit_sha else "",
|
|
134
140
|
}
|
|
@@ -346,24 +346,7 @@ def next_version(
|
|
|
346
346
|
# Step 5. apply the parser to each commit in the history (could return multiple results per commit)
|
|
347
347
|
parsed_results = list(map(commit_parser.parse, commits_since_last_release))
|
|
348
348
|
|
|
349
|
-
# Step 5A.
|
|
350
|
-
for parsed_result in parsed_results:
|
|
351
|
-
if not any(
|
|
352
|
-
(
|
|
353
|
-
isinstance(parsed_result, (ParseError, ParsedCommit)),
|
|
354
|
-
type(parsed_result) == list
|
|
355
|
-
and validate_types_in_sequence(
|
|
356
|
-
parsed_result, (ParseError, ParsedCommit)
|
|
357
|
-
),
|
|
358
|
-
type(parsed_result) == tuple
|
|
359
|
-
and validate_types_in_sequence(
|
|
360
|
-
parsed_result, (ParseError, ParsedCommit)
|
|
361
|
-
),
|
|
362
|
-
)
|
|
363
|
-
):
|
|
364
|
-
raise TypeError("Unexpected type returned from commit_parser.parse")
|
|
365
|
-
|
|
366
|
-
# Step 5B. Accumulate all parsed results into a single list accounting for possible multiple results per commit
|
|
349
|
+
# Step 5A. Accumulate all parsed results into a single list accounting for possible multiple results per commit
|
|
367
350
|
consolidated_results: list[ParseResult] = reduce(
|
|
368
351
|
lambda accumulated_results, p_results: [
|
|
369
352
|
*accumulated_results,
|
|
@@ -378,6 +361,10 @@ def next_version(
|
|
|
378
361
|
[],
|
|
379
362
|
)
|
|
380
363
|
|
|
364
|
+
# Step 5B. Validation type check for the parser results (important because of possible custom parsers)
|
|
365
|
+
if not validate_types_in_sequence(consolidated_results, (ParseError, ParsedCommit)):
|
|
366
|
+
raise TypeError("Unexpected type returned from commit_parser.parse")
|
|
367
|
+
|
|
381
368
|
# Step 5C. Parse the commits to determine the bump level that should be applied
|
|
382
369
|
parsed_levels: set[LevelBump] = {
|
|
383
370
|
parsed_result.bump # type: ignore[union-attr] # too complex for type checkers
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_semantic_release-10.3.1.dist-info → python_semantic_release-10.3.2.dist-info}/top_level.txt
RENAMED
|
File without changes
|