bump-revision: fix for new license syntax
This commit is contained in:
parent
b9982f158d
commit
138c224be9
@ -40,10 +40,12 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
old = if formula.license
|
old = if formula.license
|
||||||
license_string = if formula.license.length > 1
|
license_string = if formula.license.is_a? String
|
||||||
formula.license
|
"\"#{formula.license}\""
|
||||||
else
|
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
|
end
|
||||||
# insert replacement revision after license
|
# insert replacement revision after license
|
||||||
<<~EOS
|
<<~EOS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user