tinysemver 2.0.6__tar.gz → 2.0.7__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.
- {tinysemver-2.0.6/tinysemver.egg-info → tinysemver-2.0.7}/PKG-INFO +1 -1
- {tinysemver-2.0.6 → tinysemver-2.0.7}/pyproject.toml +1 -1
- {tinysemver-2.0.6 → tinysemver-2.0.7}/tinysemver/tinysemver.py +11 -1
- {tinysemver-2.0.6 → tinysemver-2.0.7/tinysemver.egg-info}/PKG-INFO +1 -1
- {tinysemver-2.0.6 → tinysemver-2.0.7}/LICENSE +0 -0
- {tinysemver-2.0.6 → tinysemver-2.0.7}/README.md +0 -0
- {tinysemver-2.0.6 → tinysemver-2.0.7}/setup.cfg +0 -0
- {tinysemver-2.0.6 → tinysemver-2.0.7}/tinysemver/__init__.py +0 -0
- {tinysemver-2.0.6 → tinysemver-2.0.7}/tinysemver.egg-info/SOURCES.txt +0 -0
- {tinysemver-2.0.6 → tinysemver-2.0.7}/tinysemver.egg-info/dependency_links.txt +0 -0
- {tinysemver-2.0.6 → tinysemver-2.0.7}/tinysemver.egg-info/entry_points.txt +0 -0
- {tinysemver-2.0.6 → tinysemver-2.0.7}/tinysemver.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinysemver
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: Tiny Semantic Versioning (SemVer) library, that doesn't depend on 300K lines of JavaScript
|
|
5
5
|
Author-email: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com>, Guillaume de Rouville <31691250+grouville@users.noreply.github.com>
|
|
6
6
|
License: Apache License
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tinysemver"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.7"
|
|
8
8
|
description = "Tiny Semantic Versioning (SemVer) library, that doesn't depend on 300K lines of JavaScript"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -56,6 +56,12 @@ BumpType = Literal["major", "minor", "patch"]
|
|
|
56
56
|
PathLike = Union[str, os.PathLike]
|
|
57
57
|
|
|
58
58
|
|
|
59
|
+
class NoNewCommitsError(Exception):
|
|
60
|
+
"""Raised when no new commits are found since the last tag."""
|
|
61
|
+
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
|
|
59
65
|
def get_last_tag(repository_path: PathLike) -> str:
|
|
60
66
|
"""Retrieve the last Git tag name from the repository."""
|
|
61
67
|
result = subprocess.run(
|
|
@@ -403,7 +409,8 @@ def bump(
|
|
|
403
409
|
print(f"Current version: {current_version[0]}.{current_version[1]}.{current_version[2]}")
|
|
404
410
|
|
|
405
411
|
commits_hashes, commits_messages = get_commits_since_tag(repository_path, last_tag)
|
|
406
|
-
|
|
412
|
+
if not len(commits_hashes):
|
|
413
|
+
raise NoNewCommitsError(f"No new commits since the last {last_tag} tag")
|
|
407
414
|
|
|
408
415
|
if verbose:
|
|
409
416
|
print(f"? Commits since last tag: {len(commits_hashes)}")
|
|
@@ -653,6 +660,9 @@ def main():
|
|
|
653
660
|
push=args.push,
|
|
654
661
|
create_release=args.create_release,
|
|
655
662
|
)
|
|
663
|
+
except NoNewCommitsError as e:
|
|
664
|
+
print(f"! {e}")
|
|
665
|
+
exit(0)
|
|
656
666
|
except AssertionError as e:
|
|
657
667
|
print(f"! {e}")
|
|
658
668
|
exit(1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinysemver
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: Tiny Semantic Versioning (SemVer) library, that doesn't depend on 300K lines of JavaScript
|
|
5
5
|
Author-email: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com>, Guillaume de Rouville <31691250+grouville@users.noreply.github.com>
|
|
6
6
|
License: Apache License
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|