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

New commandline flag to not check/update the configured files #149

Merged
merged 1 commit into from
Aug 30, 2020

Conversation

balrok
Copy link
Contributor

@balrok balrok commented Jul 20, 2020

Use-cases:

  • just retrieving the new version without modifying/checking the files
  • updating only a particular file with e.g., bump2version --no-configured-files major my-file.txt

With the -h text I'm not sure: I'm open for suggestions :-)

@balrok balrok force-pushed the cli-option-no-configured-files branch 2 times, most recently from 55fd6dc to 040f0e9 Compare July 20, 2020 21:24
Copy link
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Overall I think this makes sense, just some minor suggestions to improve its quality.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Comment on lines 106 to 108
# do not use the files, from the config
if args.no_configured_files:
files = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be clearer to dot his right after calling _load_configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not possible because args is at that point a list - it probably gets populated later with the commandline arguments

@balrok balrok force-pushed the cli-option-no-configured-files branch from c5e5a6b to c6a5b00 Compare July 21, 2020 15:10
bumpversion/cli.py Outdated Show resolved Hide resolved
tests/test_cli.py Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
tests/test_cli.py Show resolved Hide resolved
bumpversion/cli.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'd prefer if someone else also reviewed the work.

Perhaps we should also squash the commits?

Use-cases:
* just retrieving the new version without modifying/checking the files
* updating only a particular file with e.g., bump2version --no-configured-files major my-file.txt
@balrok balrok force-pushed the cli-option-no-configured-files branch from 2bf30b9 to 8f41535 Compare July 23, 2020 17:48
@balrok
Copy link
Contributor Author

balrok commented Aug 30, 2020

@c4urself can you merge this PR too? this is the last feature to avoid having a custom-built bump2version in our pipelines

Right now I need this for this: bump2version major --allow-dirty --no-configured-files --new-version=$newVersion --search='## Unreleased' --replace='## {new_version} ({now:%d.%m.%Y})' '${changelogFile}' || true"

since changelog and versioning are two concerns in the code and changelog-bumping should only happen on minor-version increments, I need this flag

@ekohl
Copy link
Collaborator

ekohl commented Aug 30, 2020

I think sufficient time has passed for other reviewers and LGTM.

@ekohl ekohl merged commit 78c4f4b into c4urself:master Aug 30, 2020
@c4urself
Copy link
Owner

thanks!

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

Successfully merging this pull request may close these issues.

None yet

4 participants