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
support glob keyword in configfile #150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good implementation. Some minor suggestions inline.
bumpversion/cli.py
Outdated
|
||
if section_type.get("file") == "glob": | ||
for filename_glob in glob.glob(filename): | ||
files.append(ConfiguredFile(filename_glob, VersionConfig(**section_config))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps VersionConfig(**section_config)
should be stored in a variable before the if section and used in both branches.
thanks for your comments in both PR :-) |
Yes. I think that's good because it only sets variables in the constructor, not at runtime. This saves some resources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Since I made some suggestions, I'd appreciate if another maintainer also has a look before merging.
78780b4
to
a96ebf4
Compare
just one small fix, I was not aware that python-glob does not interpret "**" by default as recursive.. one has to set the recursive-flag in this function before.. there is now also a test for this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to merge this since there was no objection from another maintainer and it looks good to me.
Thanks @balrok! |
Awesome feature, thanks @balrok! You just saved me a bunch of time! |
This implements #64