bump-revision: insert after homepage if stable block is present
This commit is contained in:
parent
7ba0f34f72
commit
5a4a57310f
@ -42,7 +42,12 @@ module Homebrew
|
|||||||
[checksum.hash_type, checksum.hexdigest]
|
[checksum.hash_type, checksum.hexdigest]
|
||||||
end
|
end
|
||||||
|
|
||||||
old = if hash_type
|
old = if formula.path.read.include?("stable do\n")
|
||||||
|
# insert replacement revision after homepage
|
||||||
|
<<~EOS
|
||||||
|
homepage "#{formula.homepage}"
|
||||||
|
EOS
|
||||||
|
elsif hash_type
|
||||||
# insert replacement revision after hash
|
# insert replacement revision after hash
|
||||||
<<~EOS
|
<<~EOS
|
||||||
#{hash_type} "#{old_hash}"
|
#{hash_type} "#{old_hash}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user