bump-revision: fix for new license syntax
This commit is contained in:
parent
b9982f158d
commit
138c224be9
@ -40,10 +40,12 @@ module Homebrew
|
||||
end
|
||||
|
||||
old = if formula.license
|
||||
license_string = if formula.license.length > 1
|
||||
formula.license
|
||||
license_string = if formula.license.is_a? String
|
||||
"\"#{formula.license}\""
|
||||
else
|
||||
"\"#{formula.license.first}\""
|
||||
formula.license.to_s.gsub(/:(\w+)=>/, '\1: ') # Change `:any_of=>` to `any_of: `
|
||||
.tr("{}", "") # Remove braces
|
||||
.gsub(/=>with: "([a-zA-Z0-9-]+)"/, ' => { with: "\1" }') # Add braces and spacing around exceptions
|
||||
end
|
||||
# insert replacement revision after license
|
||||
<<~EOS
|
||||
|
Loading…
x
Reference in New Issue
Block a user