From 7e3980a1f2dabf7c52cd44e63658466c34da676c Mon Sep 17 00:00:00 2001 From: Rulrn Date: Tue, 5 Dec 2023 20:36:34 +0100 Subject: [PATCH 1/4] .idea to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0e40360..2150a6e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ __pycache__ .mypy_cache/ .vscode +.idea From cb20b8ce80600dacf336f6cb42188fa661b278b4 Mon Sep 17 00:00:00 2001 From: Rulrn Date: Tue, 5 Dec 2023 20:41:22 +0100 Subject: [PATCH 2/4] adding version_template for test --- tbump.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tbump.toml b/tbump.toml index 200edd4..20dc399 100644 --- a/tbump.toml +++ b/tbump.toml @@ -9,6 +9,9 @@ regex = ''' (?P\d+) \. (?P\d+) + (\- + (?P.+) + )? ''' @@ -24,6 +27,7 @@ search = 'version = "{current_version}"' [[file]] src = "tbump/cli.py" +version_template = "{major}.{minor}.{patch}" [[before_commit]] name = "Run CI" From ddee45fbb3dbb6237387d4b066c1628b5e1eb62a Mon Sep 17 00:00:00 2001 From: Rulrn Date: Tue, 5 Dec 2023 21:03:03 +0100 Subject: [PATCH 3/4] solve issue --- tbump/file_bumper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tbump/file_bumper.py b/tbump/file_bumper.py index 2fd207c..f8c957d 100644 --- a/tbump/file_bumper.py +++ b/tbump/file_bumper.py @@ -224,6 +224,8 @@ def compute_change_requests(self) -> List[ChangeRequest]: change_requests = [] for file in self.files: change_request = self.compute_change_request_for_file(file) + if change_request.old_string == change_request.new_string: + continue change_requests.append(change_request) return change_requests From b57ea9328af1a3110a7006db9a76f8cc3811d23a Mon Sep 17 00:00:00 2001 From: Rulrn Date: Tue, 5 Dec 2023 21:14:32 +0100 Subject: [PATCH 4/4] revert changes used to test --- tbump.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tbump.toml b/tbump.toml index 20dc399..200edd4 100644 --- a/tbump.toml +++ b/tbump.toml @@ -9,9 +9,6 @@ regex = ''' (?P\d+) \. (?P\d+) - (\- - (?P.+) - )? ''' @@ -27,7 +24,6 @@ search = 'version = "{current_version}"' [[file]] src = "tbump/cli.py" -version_template = "{major}.{minor}.{patch}" [[before_commit]] name = "Run CI"