python-semantic-release 9.12.1__py3-none-any.whl → 9.12.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-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/METADATA +1 -1
- {python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/RECORD +15 -14
- python_semantic_release-9.12.2.dist-info/entry_points.txt +3 -0
- semantic_release/__init__.py +1 -1
- semantic_release/__main__.py +38 -2
- semantic_release/cli/commands/main.py +4 -0
- semantic_release/globals.py +6 -0
- semantic_release/hvcs/bitbucket.py +14 -1
- semantic_release/hvcs/gitea.py +27 -2
- semantic_release/hvcs/github.py +27 -2
- semantic_release/hvcs/gitlab.py +28 -4
- python_semantic_release-9.12.1.dist-info/entry_points.txt +0 -3
- {python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/AUTHORS.rst +0 -0
- {python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/LICENSE +0 -0
- {python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/WHEEL +0 -0
- {python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/top_level.txt +0 -0
{python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/RECORD
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
semantic_release/__init__.py,sha256=
|
|
2
|
-
semantic_release/__main__.py,sha256=
|
|
1
|
+
semantic_release/__init__.py,sha256=DhNOjxINWOV6dyjCQmaizz8XX9v6ReMVyZLlzmMRtiw,1229
|
|
2
|
+
semantic_release/__main__.py,sha256=kuotDU7aFKrCBeAJUPWrbIxgJWAmrXUMnztCqWMDMPY,1292
|
|
3
3
|
semantic_release/const.py,sha256=Z1o2QNh60wSLeF-_1TemMBjU3ZXbV0XghnUFsbTVfOs,831
|
|
4
4
|
semantic_release/enums.py,sha256=D5B_reQGGKQQT22HO5PUtvn2Bok3fkht6TfJtXkmAUg,1020
|
|
5
5
|
semantic_release/errors.py,sha256=rco5-lwz_0JbJrDsQWmTvT_l3bA3HFkeTmBiZfvCx-Q,2799
|
|
6
6
|
semantic_release/gitproject.py,sha256=izWc4NLdUzAwxGG_fJeqqHW9ivSrPcWBzSaOijQx4f8,8564
|
|
7
|
+
semantic_release/globals.py,sha256=imI9WKGa6MS2pTRAZiWZ2qIJup2eWnBz3OZmIj2YIHM,158
|
|
7
8
|
semantic_release/helpers.py,sha256=d1jOX0SNyqPc_3wr14xR25FfpqhMd4Ev7MNBOWlScc0,5581
|
|
8
9
|
semantic_release/changelog/__init__.py,sha256=Bg6Xe5Vt32rWoMscW-hd4sUwiZqzWmsg4CD1EhMesMY,262
|
|
9
10
|
semantic_release/changelog/context.py,sha256=y37y3M7UmVKwhu9UatNtlo5zNfTOJI8gGOTIzjYXVa8,5023
|
|
@@ -20,7 +21,7 @@ semantic_release/cli/util.py,sha256=FyXaBkeL7nXKjy3X9rQLEwvn7p46xPekp2V8Z-5MVrk,
|
|
|
20
21
|
semantic_release/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
22
|
semantic_release/cli/commands/changelog.py,sha256=kVHcGdfud74-M6hjWf1PS6l95gD4yUlu3CZGBkCt7aY,3765
|
|
22
23
|
semantic_release/cli/commands/generate_config.py,sha256=2xZOu3NpyhBp0pWr7d8ugKl_kjqQgpSsSMHq5wHTfrE,1699
|
|
23
|
-
semantic_release/cli/commands/main.py,sha256=
|
|
24
|
+
semantic_release/cli/commands/main.py,sha256=wHG51tbaAHKra21nRe3-FAfQT81-e5PGhv0KnerS15c,4100
|
|
24
25
|
semantic_release/cli/commands/publish.py,sha256=SZQlIewvqyIC14dkIIVVFetE0tPsKbO1cUyxnZsicrw,2845
|
|
25
26
|
semantic_release/cli/commands/version.py,sha256=PKNoP_b8puzcScKkQEbeB3DviJv49cQ-vjq6v25nG9Q,23931
|
|
26
27
|
semantic_release/commit_parser/__init__.py,sha256=cv5HFBdw7OJd4Laj4Ex8ZZ5Tml8GwXgQcXW6Pasr2Ao,615
|
|
@@ -49,10 +50,10 @@ semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j
|
|
|
49
50
|
semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2,sha256=NZfn1W14QochiAJ43oNKmcrCn_vgfbkKtvOTAw1jEc8,530
|
|
50
51
|
semantic_release/hvcs/__init__.py,sha256=JwoaLOF-12L-OBo_9-tOXXhdiHKeVungA9865to2oZk,494
|
|
51
52
|
semantic_release/hvcs/_base.py,sha256=9-iTqTPSbiEevKbCBP9K2hq4c-2T4wPbeLWe-kAxBzo,2607
|
|
52
|
-
semantic_release/hvcs/bitbucket.py,sha256=
|
|
53
|
-
semantic_release/hvcs/gitea.py,sha256=
|
|
54
|
-
semantic_release/hvcs/github.py,sha256=
|
|
55
|
-
semantic_release/hvcs/gitlab.py,sha256=
|
|
53
|
+
semantic_release/hvcs/bitbucket.py,sha256=DCs2mKGnHO70XGGCcsqJcHMxZawmcNlYDTwu_BSGU24,9667
|
|
54
|
+
semantic_release/hvcs/gitea.py,sha256=lHketfnqwQSwuav4hpDcwYjzfSxOpHK6v-ZwyPxYK-c,12695
|
|
55
|
+
semantic_release/hvcs/github.py,sha256=Q8XxABzcnBC1rINQsdvE-hb2cFoMohl5OY3x9rdxg7o,19917
|
|
56
|
+
semantic_release/hvcs/gitlab.py,sha256=h87bf8TMSvSLkQu-DFdbkHLMv_bG4Cz38YU4Hr-UnBw,9944
|
|
56
57
|
semantic_release/hvcs/remote_hvcs_base.py,sha256=2TaPPp1NzsQjUMOKa0NjqkjYTxJpX245qGm7-GCrnx8,6085
|
|
57
58
|
semantic_release/hvcs/token_auth.py,sha256=ZjT56-NIPB4OKIt1qwHCu1TavXnrWFIBl9ARlg56hgU,663
|
|
58
59
|
semantic_release/hvcs/util.py,sha256=Mgr1dExd6E3qOpeeF8vRX9joP52YV9e82S68z8xa4KM,2859
|
|
@@ -61,10 +62,10 @@ semantic_release/version/algorithm.py,sha256=ofx_bIWq6ptJVr-ekI11IzxzDEctDKFiVwa
|
|
|
61
62
|
semantic_release/version/declaration.py,sha256=f6Ld7hIhrqvDrRBapJHr-KDimuyo-4IG8009Zu9BIgU,7357
|
|
62
63
|
semantic_release/version/translator.py,sha256=P1noIsVBn8u6zNOFjG0xKYOWapxqf_PHSMvMeLJ9kXg,3050
|
|
63
64
|
semantic_release/version/version.py,sha256=6PCtSbLP88U1daoxnCwHc--YguZo4waGNLqJ5JfeczE,14175
|
|
64
|
-
python_semantic_release-9.12.
|
|
65
|
-
python_semantic_release-9.12.
|
|
66
|
-
python_semantic_release-9.12.
|
|
67
|
-
python_semantic_release-9.12.
|
|
68
|
-
python_semantic_release-9.12.
|
|
69
|
-
python_semantic_release-9.12.
|
|
70
|
-
python_semantic_release-9.12.
|
|
65
|
+
python_semantic_release-9.12.2.dist-info/AUTHORS.rst,sha256=XOReVvpymEFUPsS2QPH97jlfJBVrxwS2eu8-jVAe4gk,230
|
|
66
|
+
python_semantic_release-9.12.2.dist-info/LICENSE,sha256=NE85nszX252sdQdu0xgS9qwfYES0k8qS6gW3uO4jRGE,1083
|
|
67
|
+
python_semantic_release-9.12.2.dist-info/METADATA,sha256=ONiKGfUl4d-OGkLjgRYVvT-TG-6QYTxvGGmOhi-pvFY,3571
|
|
68
|
+
python_semantic_release-9.12.2.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
|
69
|
+
python_semantic_release-9.12.2.dist-info/entry_points.txt,sha256=r2Jql3GTQyugQnvf34l2eXk1O_Qx6llR_xixG1ZWgD0,105
|
|
70
|
+
python_semantic_release-9.12.2.dist-info/top_level.txt,sha256=qYA24nyg3eP-ti5UW7Vuj2aXVmM0wqVHx4mREdRZNAA,17
|
|
71
|
+
python_semantic_release-9.12.2.dist-info/RECORD,,
|
semantic_release/__init__.py
CHANGED
semantic_release/__main__.py
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
|
+
"""Entrypoint for the `semantic-release` module."""
|
|
2
|
+
# ruff: noqa: T201, print statements are fine here as this is for cli entry only
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
1
6
|
import sys
|
|
7
|
+
from traceback import format_exception
|
|
8
|
+
|
|
9
|
+
from semantic_release import globals
|
|
10
|
+
from semantic_release.cli.commands.main import main as cli_main
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main() -> None:
|
|
14
|
+
try:
|
|
15
|
+
cli_main(args=sys.argv[1:])
|
|
16
|
+
print("semantic-release completed successfully.", file=sys.stderr)
|
|
17
|
+
except KeyboardInterrupt:
|
|
18
|
+
print("\n-- User Abort! --", file=sys.stderr)
|
|
19
|
+
sys.exit(127)
|
|
20
|
+
except Exception as err: # noqa: BLE001, graceful error handling across application
|
|
21
|
+
if globals.debug:
|
|
22
|
+
print(f"{err.__class__.__name__}: {err}\n", file=sys.stderr)
|
|
23
|
+
etype, value, traceback = sys.exc_info()
|
|
24
|
+
print(
|
|
25
|
+
str.join(
|
|
26
|
+
"",
|
|
27
|
+
format_exception(
|
|
28
|
+
etype,
|
|
29
|
+
value,
|
|
30
|
+
traceback,
|
|
31
|
+
limit=None,
|
|
32
|
+
chain=True,
|
|
33
|
+
)[:-1],
|
|
34
|
+
),
|
|
35
|
+
file=sys.stderr,
|
|
36
|
+
)
|
|
37
|
+
print(f"::ERROR:: {err}", file=sys.stderr)
|
|
38
|
+
sys.exit(1)
|
|
2
39
|
|
|
3
|
-
from semantic_release.cli.commands.main import main
|
|
4
40
|
|
|
5
41
|
if __name__ == "__main__":
|
|
6
|
-
main(
|
|
42
|
+
main()
|
|
@@ -10,6 +10,7 @@ from rich.console import Console
|
|
|
10
10
|
from rich.logging import RichHandler
|
|
11
11
|
|
|
12
12
|
import semantic_release
|
|
13
|
+
from semantic_release import globals
|
|
13
14
|
from semantic_release.cli.cli_context import CliContextObj
|
|
14
15
|
from semantic_release.cli.config import GlobalCommandLineOptions
|
|
15
16
|
from semantic_release.cli.const import DEFAULT_CONFIG_FILE
|
|
@@ -122,6 +123,9 @@ def main(
|
|
|
122
123
|
logger = logging.getLogger(__name__)
|
|
123
124
|
logger.debug("logging level set to: %s", logging.getLevelName(log_level))
|
|
124
125
|
|
|
126
|
+
if log_level == logging.DEBUG:
|
|
127
|
+
globals.debug = True
|
|
128
|
+
|
|
125
129
|
if noop:
|
|
126
130
|
rprint(
|
|
127
131
|
":shield: [bold cyan]You are running in no-operation mode, because the "
|
|
@@ -9,6 +9,7 @@ import logging
|
|
|
9
9
|
import os
|
|
10
10
|
from functools import lru_cache
|
|
11
11
|
from pathlib import PurePosixPath
|
|
12
|
+
from re import compile as regexp
|
|
12
13
|
from typing import TYPE_CHECKING
|
|
13
14
|
|
|
14
15
|
from urllib3.util.url import Url, parse_url
|
|
@@ -201,7 +202,19 @@ class Bitbucket(RemoteHvcsBase):
|
|
|
201
202
|
return self.create_repo_url(repo_path=f"/commits/{commit_hash}")
|
|
202
203
|
|
|
203
204
|
def pull_request_url(self, pr_number: str | int) -> str:
|
|
204
|
-
|
|
205
|
+
# Strips off any character prefix like '#' that usually exists
|
|
206
|
+
if isinstance(pr_number, str) and (
|
|
207
|
+
match := regexp(r"(\d+)$").search(pr_number)
|
|
208
|
+
):
|
|
209
|
+
try:
|
|
210
|
+
pr_number = int(match.group(1))
|
|
211
|
+
except ValueError:
|
|
212
|
+
return ""
|
|
213
|
+
|
|
214
|
+
if isinstance(pr_number, int):
|
|
215
|
+
return self.create_repo_url(repo_path=f"/pull-requests/{pr_number}")
|
|
216
|
+
|
|
217
|
+
return ""
|
|
205
218
|
|
|
206
219
|
def get_changelog_context_filters(self) -> tuple[Callable[..., Any], ...]:
|
|
207
220
|
return (
|
semantic_release/hvcs/gitea.py
CHANGED
|
@@ -6,6 +6,7 @@ import glob
|
|
|
6
6
|
import logging
|
|
7
7
|
import os
|
|
8
8
|
from pathlib import PurePosixPath
|
|
9
|
+
from re import compile as regexp
|
|
9
10
|
from typing import TYPE_CHECKING
|
|
10
11
|
|
|
11
12
|
from requests import HTTPError, JSONDecodeError
|
|
@@ -350,10 +351,34 @@ class Gitea(RemoteHvcsBase):
|
|
|
350
351
|
return self.create_repo_url(repo_path=f"/commit/{commit_hash}")
|
|
351
352
|
|
|
352
353
|
def issue_url(self, issue_num: str | int) -> str:
|
|
353
|
-
|
|
354
|
+
# Strips off any character prefix like '#' that usually exists
|
|
355
|
+
if isinstance(issue_num, str) and (
|
|
356
|
+
match := regexp(r"(\d+)$").search(issue_num)
|
|
357
|
+
):
|
|
358
|
+
try:
|
|
359
|
+
issue_num = int(match.group(1))
|
|
360
|
+
except ValueError:
|
|
361
|
+
return ""
|
|
362
|
+
|
|
363
|
+
if isinstance(issue_num, int):
|
|
364
|
+
return self.create_repo_url(repo_path=f"/issues/{issue_num}")
|
|
365
|
+
|
|
366
|
+
return ""
|
|
354
367
|
|
|
355
368
|
def pull_request_url(self, pr_number: str | int) -> str:
|
|
356
|
-
|
|
369
|
+
# Strips off any character prefix like '#' that usually exists
|
|
370
|
+
if isinstance(pr_number, str) and (
|
|
371
|
+
match := regexp(r"(\d+)$").search(pr_number)
|
|
372
|
+
):
|
|
373
|
+
try:
|
|
374
|
+
pr_number = int(match.group(1))
|
|
375
|
+
except ValueError:
|
|
376
|
+
return ""
|
|
377
|
+
|
|
378
|
+
if isinstance(pr_number, int):
|
|
379
|
+
return self.create_repo_url(repo_path=f"/pulls/{pr_number}")
|
|
380
|
+
|
|
381
|
+
return ""
|
|
357
382
|
|
|
358
383
|
def get_changelog_context_filters(self) -> tuple[Callable[..., Any], ...]:
|
|
359
384
|
return (
|
semantic_release/hvcs/github.py
CHANGED
|
@@ -8,6 +8,7 @@ import mimetypes
|
|
|
8
8
|
import os
|
|
9
9
|
from functools import lru_cache
|
|
10
10
|
from pathlib import PurePosixPath
|
|
11
|
+
from re import compile as regexp
|
|
11
12
|
from typing import TYPE_CHECKING
|
|
12
13
|
|
|
13
14
|
from requests import HTTPError, JSONDecodeError
|
|
@@ -501,10 +502,34 @@ class Github(RemoteHvcsBase):
|
|
|
501
502
|
return self.create_repo_url(repo_path=f"/commit/{commit_hash}")
|
|
502
503
|
|
|
503
504
|
def issue_url(self, issue_num: str | int) -> str:
|
|
504
|
-
|
|
505
|
+
# Strips off any character prefix like '#' that usually exists
|
|
506
|
+
if isinstance(issue_num, str) and (
|
|
507
|
+
match := regexp(r"(\d+)$").search(issue_num)
|
|
508
|
+
):
|
|
509
|
+
try:
|
|
510
|
+
issue_num = int(match.group(1))
|
|
511
|
+
except ValueError:
|
|
512
|
+
return ""
|
|
513
|
+
|
|
514
|
+
if isinstance(issue_num, int):
|
|
515
|
+
return self.create_repo_url(repo_path=f"/issues/{issue_num}")
|
|
516
|
+
|
|
517
|
+
return ""
|
|
505
518
|
|
|
506
519
|
def pull_request_url(self, pr_number: str | int) -> str:
|
|
507
|
-
|
|
520
|
+
# Strips off any character prefix like '#' that usually exists
|
|
521
|
+
if isinstance(pr_number, str) and (
|
|
522
|
+
match := regexp(r"(\d+)$").search(pr_number)
|
|
523
|
+
):
|
|
524
|
+
try:
|
|
525
|
+
pr_number = int(match.group(1))
|
|
526
|
+
except ValueError:
|
|
527
|
+
return ""
|
|
528
|
+
|
|
529
|
+
if isinstance(pr_number, int):
|
|
530
|
+
return self.create_repo_url(repo_path=f"/pull/{pr_number}")
|
|
531
|
+
|
|
532
|
+
return ""
|
|
508
533
|
|
|
509
534
|
def get_changelog_context_filters(self) -> tuple[Callable[..., Any], ...]:
|
|
510
535
|
return (
|
semantic_release/hvcs/gitlab.py
CHANGED
|
@@ -6,6 +6,7 @@ import logging
|
|
|
6
6
|
import os
|
|
7
7
|
from functools import lru_cache
|
|
8
8
|
from pathlib import PurePosixPath
|
|
9
|
+
from re import compile as regexp
|
|
9
10
|
from typing import TYPE_CHECKING
|
|
10
11
|
|
|
11
12
|
import gitlab
|
|
@@ -239,14 +240,37 @@ class Gitlab(RemoteHvcsBase):
|
|
|
239
240
|
def commit_hash_url(self, commit_hash: str) -> str:
|
|
240
241
|
return self.create_repo_url(repo_path=f"/-/commit/{commit_hash}")
|
|
241
242
|
|
|
242
|
-
def issue_url(self,
|
|
243
|
-
|
|
243
|
+
def issue_url(self, issue_num: str | int) -> str:
|
|
244
|
+
# Strips off any character prefix like '#' that usually exists
|
|
245
|
+
if isinstance(issue_num, str) and (
|
|
246
|
+
match := regexp(r"(\d+)$").search(issue_num)
|
|
247
|
+
):
|
|
248
|
+
try:
|
|
249
|
+
issue_num = int(match.group(1))
|
|
250
|
+
except ValueError:
|
|
251
|
+
return ""
|
|
252
|
+
|
|
253
|
+
if isinstance(issue_num, int):
|
|
254
|
+
return self.create_repo_url(repo_path=f"/-/issues/{issue_num}")
|
|
255
|
+
|
|
256
|
+
return ""
|
|
244
257
|
|
|
245
258
|
def merge_request_url(self, mr_number: str | int) -> str:
|
|
246
|
-
|
|
259
|
+
# Strips off any character prefix like '!' that usually exists
|
|
260
|
+
if isinstance(mr_number, str) and (
|
|
261
|
+
match := regexp(r"(\d+)$").search(mr_number)
|
|
262
|
+
):
|
|
263
|
+
try:
|
|
264
|
+
mr_number = int(match.group(1))
|
|
265
|
+
except ValueError:
|
|
266
|
+
return ""
|
|
267
|
+
|
|
268
|
+
if isinstance(mr_number, int):
|
|
269
|
+
return self.create_repo_url(repo_path=f"/-/merge_requests/{mr_number}")
|
|
270
|
+
|
|
271
|
+
return ""
|
|
247
272
|
|
|
248
273
|
def pull_request_url(self, pr_number: str | int) -> str:
|
|
249
|
-
# TODO: deprecate in v11, add warning in v10
|
|
250
274
|
return self.merge_request_url(mr_number=pr_number)
|
|
251
275
|
|
|
252
276
|
def upload_dists(self, tag: str, dist_glob: str) -> int:
|
{python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/AUTHORS.rst
RENAMED
|
File without changes
|
{python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
{python_semantic_release-9.12.1.dist-info → python_semantic_release-9.12.2.dist-info}/top_level.txt
RENAMED
|
File without changes
|