fix(release): anchor aft version pattern in bump config#10
Merged
Conversation
The `version = "{current_version}"` search pattern matched the
`chart-version` line as a substring, so the second files entry rewrote
both lines in versions.toml.
The third files entry then failed with "Did not find
'chart-version = \"0.1.0\"'" and aborted the release workflow.
Switch the aft version entry to a regex anchored on `^version` so it
only touches the `[aft]` line, leaving the `chart-version` entry to do
its own replacement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bump versionworkflow (run Add Helm chart version bumping config #2) failed withDid not find 'chart-version = "0.1.0"' in file: 'versions.toml'.[[tool.bumpversion.files]]entry used the search stringversion = "{current_version}", which is a substring ofchart-version = "0.1.0". bump-my-version rewrote both lines in step 2, so step 3 had nothing left to match and aborted with exit 2.regex = trueand^version = "{current_version}"so it only touches the[aft]line. Thechart-versionentry remains responsible for its own replacement.Test plan
uv run bump-my-version bump --dry-run --verbose --allow-dirty minor– all four file rewrites succeed (pyproject.toml,versions.toml [aft],versions.toml chart-version,helm/Chart.yaml).Bump versionworkflow onmainafter this merges and confirm it goes green.