Skip to content
Closed
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
6 changes: 5 additions & 1 deletion bumpversion/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def main(original_args=None):
for file_name
in (file_names or positionals[1:])
)

if config_file_exists and config_file not in files:
files.extend([ConfiguredFile(config_file, version_config)])

_check_files_contain_version(files, current_version, context)
_replace_version_in_files(files, current_version, new_version, args.dry_run, context)
_log_list(config, args.new_version)
Expand Down Expand Up @@ -606,7 +610,7 @@ def _update_config_file(
config.set("bumpversion", "current_version", new_version)
new_config = StringIO()
try:
write_to_config_file = (not dry_run) and config_file_exists
write_to_config_file = (not dry_run) and not config_file_exists

logger.info(
"%s to config file %s:",
Expand Down