Merge pull request #7989 from SeekingMeaning/bump-revision-license

dev-cmd/bump-revision: insert revision after license
This commit is contained in:
Jonathan Chang 2020-07-13 17:12:15 +10:00 committed by GitHub
commit 45ddf773ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,12 @@ module Homebrew
[checksum.hash_type, checksum.hexdigest]
end
old = if formula.path.read.include?("stable do\n")
old = if formula.license
# insert replacement revision after license
<<~EOS
license "#{formula.license}"
EOS
elsif formula.path.read.include?("stable do\n")
# insert replacement revision after homepage
<<~EOS
homepage "#{formula.homepage}"