Revert "Merge pull request #7316 from bayandin/fix-bump-revision"
This reverts commit a7fdc7046f5cda8743591040117e409cd24dae76, reversing changes made to bfa175d118112989b24908ea16c5a97c1dd011e4.
This commit is contained in:
parent
bdc7ebf3c7
commit
7ba0f34f72
@ -42,14 +42,7 @@ module Homebrew
|
||||
[checksum.hash_type, checksum.hexdigest]
|
||||
end
|
||||
|
||||
stable_block_given = formula.path.read.include? " stable do"
|
||||
|
||||
old = if stable_block_given
|
||||
# insert replacement revision before stable block
|
||||
<<~EOS
|
||||
stable do
|
||||
EOS
|
||||
elsif hash_type
|
||||
old = if hash_type
|
||||
# insert replacement revision after hash
|
||||
<<~EOS
|
||||
#{hash_type} "#{old_hash}"
|
||||
@ -60,12 +53,8 @@ module Homebrew
|
||||
:revision => "#{formula_spec.specs[:revision]}"
|
||||
EOS
|
||||
end
|
||||
replacement = old + " revision 1\n"
|
||||
|
||||
replacement = if stable_block_given
|
||||
"revision 1\n " + old
|
||||
else
|
||||
old + " revision 1\n"
|
||||
end
|
||||
else
|
||||
old = "revision #{current_revision}"
|
||||
replacement = "revision #{current_revision+1}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user