bump-formula-pr: handle url with specs hash #13474
Merged
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.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?As mentioned in #13471, the existing
bump-formula-pr
regexes expect aurl
string to only be followed by a newline. However,url
also accepts aspecs
hash, which can appear after theurl
string. For example:This commit modifies the regexes to capture anything after the
url
string and before the newline. This works for the aforementioned example, where the trailing hash is on the same line, but it won't work if the hash appears on a subsequent line. For example:I spent some time trying to create a regex that would also work for the latter case but didn't meet with success (my brain is a bit too tired tonight). Since we don't have any instances of the multiline format in homebrew/core yet, there's something to be said for merging this PR in the short-term to fix
brew bump-formula-pr
and we can adjust this in a follow-up PR if we come up with a more comprehensive solution.Fixes #13471.