File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -337,9 +337,9 @@ def __call__(
337
337
"default" : None ,
338
338
},
339
339
{
340
- "name" : ["--empty " ],
340
+ "name" : ["--allow-no-commit " ],
341
341
"default" : False ,
342
- "help" : "bump tags without new commits" ,
342
+ "help" : "bump version without eligible commits" ,
343
343
"action" : "store_true" ,
344
344
},
345
345
],
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ def __call__(self) -> None: # noqa: C901
159
159
manual_version = self .arguments ["manual_version" ]
160
160
build_metadata = self .arguments ["build_metadata" ]
161
161
increment_mode : str = self .arguments ["increment_mode" ]
162
- is_empty : bool | None = self .arguments ["empty " ]
162
+ allow_no_commit : bool | None = self .arguments ["allow_no_commit " ]
163
163
164
164
if manual_version :
165
165
if increment :
@@ -232,7 +232,11 @@ def __call__(self) -> None: # noqa: C901
232
232
233
233
# No commits, there is no need to create an empty tag.
234
234
# Unless we previously had a prerelease.
235
- if not commits and not current_version .is_prerelease and not is_empty :
235
+ if (
236
+ not commits
237
+ and not current_version .is_prerelease
238
+ and not allow_no_commit
239
+ ):
236
240
raise NoCommitsFoundError (
237
241
"[NO_COMMITS_FOUND]\n " "No new commits found."
238
242
)
@@ -249,7 +253,7 @@ def __call__(self) -> None: # noqa: C901
249
253
)
250
254
251
255
# we create an empty PATCH increment for empty tag
252
- if increment is None and is_empty :
256
+ if increment is None and allow_no_commit :
253
257
increment = "PATCH"
254
258
255
259
new_version = current_version .bump (
You can’t perform that action at this time.
0 commit comments