Skip to content
Snippets Groups Projects
Unverified Commit 886d2ede authored by Dawid Dziurla's avatar Dawid Dziurla Committed by GitHub
Browse files

Merge pull request #8082 from dawidd6/bump

bump-formula-pr: fix when no 'version' stanza in formula found
parents a0ea1048 1e805e04
No related branches found
No related tags found
No related merge requests found
......@@ -276,11 +276,16 @@ module Homebrew
/^( +)(mirror "#{Regexp.escape(new_mirrors.last)}"\n)/m,
"\\1\\2\\1version \"#{new_version}\"\n",
]
else
elsif new_url
[
/^( +)(url "#{Regexp.escape(new_url)}"\n)/m,
"\\1\\2\\1version \"#{new_version}\"\n",
]
elsif new_revision
[
/^( {2})( +)(:revision => "#{new_revision}"\n)/m,
"\\1\\2\\3\\1version \"#{new_version}\"\n",
]
end
elsif forced_version && new_version == "0"
replacement_pairs << [
......@@ -288,7 +293,7 @@ module Homebrew
"",
]
end
new_contents = inreplace_pairs(formula.path, replacement_pairs.uniq)
new_contents = inreplace_pairs(formula.path, replacement_pairs.uniq.compact)
new_formula_version = formula_version(formula, requested_spec, new_contents)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment