diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index d656a1b57a..5d3ffb3e90 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -3,7 +3,7 @@ import questionary from packaging.version import Version -from commitizen import bump, factory, git, out +from commitizen import bump, cmd, factory, git, out from commitizen.commands.changelog import Changelog from commitizen.config import BaseConfig from commitizen.exceptions import ( @@ -142,7 +142,7 @@ def __call__(self): # noqa: C901 raise ExpectedExit() if self.changelog: - changelog = Changelog( + changelog_cmd = Changelog( self.config, { "unreleased_version": new_tag_version, @@ -150,7 +150,8 @@ def __call__(self): # noqa: C901 "dry_run": dry_run, }, ) - changelog() + changelog_cmd() + c = cmd.run(f"git add {changelog_cmd.file_name}") self.config.set_key("version", new_version.public) c = git.commit(message, args=self._get_commit_args())