fix: escape dots in majorMinor regex to prevent false tag matches in prepare-release.sh#1893
Draft
Copilot wants to merge 2 commits into
Draft
fix: escape dots in majorMinor regex to prevent false tag matches in prepare-release.sh#1893Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Copilot created this pull request from a session on behalf of
abdurriq
June 15, 2026 18:34
View session
Contributor
|
@copilot Also have the test be run on PRs / changes to the main script so that we can catch regressions. |
Contributor
Author
Added |
Comment on lines
+17
to
+22
| name: Test prepare-release script | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Run prepare-release tests | ||
| run: bash build/test-prepare-release.sh |
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.
In
update_readme_version,majorMinor(e.g.2.1) was interpolated directly intosed/greppatterns where.matches any character. This caused tags like:2-1.26to satisfy the2.1pattern (dash satisfying the unescaped dot), rewriting2-1.26→2.1.4instead of leaving it alone.Changes
build/prepare-release.sh: escape dots inmajorMinorbefore use in allsed/grepexpressions:build/test-prepare-release.sh: new test script with four cases, including the regression case where2-1.26must survive a2.1.3→2.1.4bump untouched..github/workflows/test-prepare-release.yml: new CI workflow that runsbuild/test-prepare-release.shon any PR or push tomainthat touchesbuild/prepare-release.shorbuild/test-prepare-release.sh, ensuring regressions are caught automatically.