You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bump is also changing dependency versions in pyproject.toml, when the versions are the same #496
I suppose it might also help to clarify in the documentation I linked to above that the pattern is a Python regular expression matched using re.finditer. That would also serve the purpose of clarifying that the file isn't searched line by line. Or see #498 for a proposed alternative to the current matching behavior.
Just to be clear on this: Is the current recommended action to use version_files = ["pyproject.toml:^version"]?
FWIW I was thinking that it would be great if we could specify a full TOML qualifier like version_files = ["pyproject.toml:tool.commitizen.version"]. But that is likely a far larger lift, and I could fully understand not wanting to do it.
Basically, you can use whatever Python regex suits your needs. Worst case, you could add a comment to one line and not the other(s) if they are identical. The regex is matched line by line these days, which makes it simpler to choose one appropriate to your situation in my opinion.
Activity
Andrew-Sheridan commentedon Apr 4, 2022
May be related to PR #370
where this syntax was proposed
However that seems a little inelegant - also does not appear that syntax was used.
I think changing it like this should work.
Perhaps just the docs needs an update to say that regex is permitted?
woile commentedon Apr 7, 2022
Yes, updating the docs should be enough, would you mind sending a pr or describing here where would you update?
Thanks
Kurt-von-Laven commentedon May 2, 2022
The docs already say that a regex is permitted.
Lee-W commentedon May 3, 2022
Maybe what we need is adding it to the FAQ page might be a good idea
Kurt-von-Laven commentedon May 4, 2022
I suppose it might also help to clarify in the documentation I linked to above that the pattern is a Python regular expression matched using re.finditer. That would also serve the purpose of clarifying that the file isn't searched line by line. Or see #498 for a proposed alternative to the current matching behavior.
tarkatronic commentedon Feb 21, 2023
Just to be clear on this: Is the current recommended action to use
version_files = ["pyproject.toml:^version"]?FWIW I was thinking that it would be great if we could specify a full TOML qualifier like
version_files = ["pyproject.toml:tool.commitizen.version"]. But that is likely a far larger lift, and I could fully understand not wanting to do it.Kurt-von-Laven commentedon Feb 21, 2023
Basically, you can use whatever Python regex suits your needs. Worst case, you could add a comment to one line and not the other(s) if they are identical. The regex is matched line by line these days, which makes it simpler to choose one appropriate to your situation in my opinion.
woile commentedon Apr 28, 2023
Option 1
When selecting version, start with
^, so it will check that the line starts withversionOption 2 (recommended)
Use
version_provider, see https://commitizen-tools.github.io/commitizen/config/#version-providersSample:
Lee-W commentedon May 6, 2023
Should we add it as part of our FAQ? I think it's something worth mentioning
woile commentedon May 6, 2023
Yes, could be a good idea, under which question would be add it? They are both documented, but not together
Lee-W commentedon Aug 20, 2023
I think we can just add a question to FAQ, paste your response and add come links to other parts of the document.