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

globbing in config file parsing, like [bumpversion:file:*.py] #64

Closed
rbeyer opened this issue Feb 20, 2019 · 4 comments · Fixed by #150
Closed

globbing in config file parsing, like [bumpversion:file:*.py] #64

rbeyer opened this issue Feb 20, 2019 · 4 comments · Fixed by #150

Comments

@rbeyer
Copy link

rbeyer commented Feb 20, 2019

There was a similar Issue open on the original bumpversion: peritus/bumpversion#104

but it was opened about a month before the last commit on that project.

Perhaps more succinctly composed: the issue is, in addition to having the string after the final : in [bumpversion:file:file_path] be interpreted as a strict path, could it be run through the glob library or the .glob() function of pathlib's Path object? So that the rules in such a section could be applied to multiple files that match the pattern?

Clearly, that's possible, but is there any reason not to implement it?

@mdfischer
Copy link

I'd also love to see this wildcard functionality. We have a project with different standalone serverless modules, each in its own subfolder. So it would be great to be able to specify these as a group in the configuration file, and have the version bump be applied to all files within that folder.

@c4urself
Copy link
Owner

yeah I don't see why not

@florisla
Copy link
Collaborator

florisla commented Jan 6, 2020

Perhaps this would be a nice syntax: instead of file, use glob.

[bumpversion:glob:./*/__init__.py]
[bumpversion:glob:version*.py]

@c4urself
Copy link
Owner

👍 on the design glob:<pattern>

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

Successfully merging a pull request may close this issue.

4 participants