File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -343,9 +343,9 @@ def __call__(
343343 "default" : None ,
344344 },
345345 {
346- "name" : ["--empty " ],
346+ "name" : ["--allow-no-commit " ],
347347 "default" : False ,
348- "help" : "bump tags without new commits" ,
348+ "help" : "bump version without eligible commits" ,
349349 "action" : "store_true" ,
350350 },
351351 ],
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ def __call__(self) -> None: # noqa: C901
159159 manual_version = self .arguments ["manual_version" ]
160160 build_metadata = self .arguments ["build_metadata" ]
161161 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 " ]
163163
164164 if manual_version :
165165 if increment :
@@ -232,7 +232,11 @@ def __call__(self) -> None: # noqa: C901
232232
233233 # No commits, there is no need to create an empty tag.
234234 # 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+ ):
236240 raise NoCommitsFoundError (
237241 "[NO_COMMITS_FOUND]\n " "No new commits found."
238242 )
@@ -249,7 +253,7 @@ def __call__(self) -> None: # noqa: C901
249253 )
250254
251255 # 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 :
253257 increment = "PATCH"
254258
255259 new_version = current_version .bump (
You can’t perform that action at this time.
0 commit comments