bump-formula-pr: more precise tag/version replacement

This commit is contained in:
Alexander Bayandin 2022-07-06 09:47:17 +01:00 committed by EricFromCanada
parent 9766811343
commit cfa63e9b86
No known key found for this signature in database
GPG Key ID: 179D9CDDDB814168

View File

@ -243,7 +243,7 @@ module Homebrew
elsif new_tag.present? elsif new_tag.present?
[ [
[ [
formula_spec.specs[:tag], /#{formula_spec.specs[:tag]}(?=")/,
new_tag, new_tag,
], ],
[ [
@ -283,8 +283,8 @@ module Homebrew
if forced_version && new_version != "0" if forced_version && new_version != "0"
replacement_pairs << if old_contents.include?("version \"#{old_formula_version}\"") replacement_pairs << if old_contents.include?("version \"#{old_formula_version}\"")
[ [
old_formula_version.to_s, "version \"#{old_formula_version}\"",
new_version, "version \"#{new_version}\"",
] ]
elsif new_mirrors.present? elsif new_mirrors.present?
[ [