Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions commitizen/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ def __call__(
{
"name": "--files-only",
"action": "store_true",
"help": "Bump version in config files (deprecated; use --version-files-only).",
},
{
"name": "--version-files-only",
"action": "store_true",
"help": "bump version in the files from the config",
},
{
Expand Down
11 changes: 10 additions & 1 deletion commitizen/commands/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class BumpArgs(Settings, total=False):
dry_run: bool
file_name: str
files_only: bool | None
version_files_only: bool | None
get_next: bool
git_output_to_stderr: bool
increment_mode: str
Expand Down Expand Up @@ -356,9 +357,17 @@ def __call__(self) -> None:
else None,
)

if self.arguments["files_only"]:
if self.arguments.get("files_only"):
warnings.warn(
"--files-only is deprecated and will be removed in v5. Use --version-files-only instead.",
DeprecationWarning,
)
raise ExpectedExit()

if self.arguments.get("version_files_only"):
raise ExpectedExit()


# FIXME: check if any changes have been staged
git.add(*files)
c = git.commit(message, args=self._get_commit_args())
Expand Down
Loading
Loading