Merge pull request #13474 from samford/bump-formula-pr-handle-url-wth-specs-hash

bump-formula-pr: handle url with specs hash
This commit is contained in:
Bo Anderson 2022-06-25 20:27:45 +01:00 committed by GitHub
commit 38e1af8576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,7 +275,7 @@ module Homebrew
if new_mirrors.present?
replacement_pairs << [
/^( +)(url "#{Regexp.escape(new_url)}"\n)/m,
/^( +)(url "#{Regexp.escape(new_url)}"[^\n]*?\n)/m,
"\\1\\2\\1mirror \"#{new_mirrors.join("\"\n\\1mirror \"")}\"\n",
]
end
@ -293,7 +293,7 @@ module Homebrew
]
elsif new_url.present?
[
/^( +)(url "#{Regexp.escape(new_url)}"\n)/m,
/^( +)(url "#{Regexp.escape(new_url)}"[^\n]*?\n)/m,
"\\1\\2\\1version \"#{new_version}\"\n",
]
elsif new_revision.present?