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

Multi-line regex support for search pattern #83

Open
achary opened this issue Feb 7, 2021 · 4 comments
Open

Multi-line regex support for search pattern #83

achary opened this issue Feb 7, 2021 · 4 comments

Comments

@achary
Copy link

achary commented Feb 7, 2021

First, thanks for this nice tool. I exactly understand your motivation for switching from bumpversion and I admit that solving various workflow and integration issues (like incorporating change log generation in the same transaction) became nice and easy with tbump.

Now to the issue.
I'm using the tool to support version tracking for project, where a single line match is not ambiguity-free. Eg. the version is stored as:

[[package]]
name = "my-project"
version = "1.1.0"

along with references to other thirdparty packages, let's say:

[[package]]
name = "rustc-hash"
version = "1.1.0"

[[package]]
name = "scopeguard"
version = "1.1.0"

Making a search formula in tbump.toml to bump only the my-project version string to 1.2.0 is currently not possible IMO.

I suggest supporting multi-line regex, so things like \n line ending could be added to make unique matches possible in situations like this:

search = '^name = "my-project"\nversion = "{current_version}"'
@achary
Copy link
Author

achary commented May 21, 2021

Here is a PR for review for it: #98.

@dmerejkowsky

This comment has been minimized.

@achary

This comment has been minimized.

@dmerejkowsky

This comment has been minimized.

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

No branches or pull requests

2 participants