Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow not updating the config file, even when it exists. #169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

coderanger
Copy link

This allows working completely off the latest tag support for current_version so the config file doesn't change on bump.

@coderanger
Copy link
Author

Any chance of this getting looked at?

Copy link
Collaborator

@florisla florisla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be updated in the README.

@@ -127,7 +127,7 @@ def main(original_args=None):

# store the new version
_update_config_file(
config, config_file, config_newlines, config_file_exists, args.new_version, args.dry_run,
config, config_file, config_newlines, config_file_exists, args.new_version, args.dry_run, args.no_update_config,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we bypass _update_config_file altogether in case of no_update_config ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do that too, would you prefer that? Was trying to avoid flow changes as much as possible.

@florisla
Copy link
Collaborator

florisla commented Jan 6, 2021

Does this not bring the version in the config out of sync with the other version numbers?

@coderanger
Copy link
Author

The goal was to better help with a tag-only workflow. So a config like:

[bumpversion]
commit = True
tag = True
no_update_config = True
parse = (?P<major>\d+)\.(?P<minor>\d+)
serialize = {major}.{minor}

With no current_version at all, and the version discovered only from the latest tag on the fly.

@florisla
Copy link
Collaborator

OK. Do you think it's possible to have no no_update_configat all option, and just assume this in case we can't find a current_version in the config or in the command-line arguments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants