bunch of style fixes
This commit is contained in:
parent
2970abdc73
commit
fbd5c32d22
@ -20,8 +20,8 @@ module Homebrew
|
|||||||
Update SPDX license data in the Homebrew repository.
|
Update SPDX license data in the Homebrew repository.
|
||||||
EOS
|
EOS
|
||||||
switch "--fail-if-changed",
|
switch "--fail-if-changed",
|
||||||
description: "Return a failing status code if current license data's version is different from the upstream. This "\
|
description: "Return a failing status code if current license data's version is different from"\
|
||||||
"can be used to notify CI when the SPDX license data is out of date."
|
"the upstream. This can be used to notify CI when the SPDX license data is out of date."
|
||||||
|
|
||||||
max_named 0
|
max_named 0
|
||||||
end
|
end
|
||||||
@ -30,15 +30,15 @@ module Homebrew
|
|||||||
def update_license_data
|
def update_license_data
|
||||||
update_license_data_args.parse
|
update_license_data_args.parse
|
||||||
puts "Fetching newest version of SPDX License data..."
|
puts "Fetching newest version of SPDX License data..."
|
||||||
open(SPDX_DATA_URL) do |json|
|
File.open(SPDX_DATA_URL) do |json|
|
||||||
File.open(SPDX_FOLDER_PATH/FILE_NAME, "wb") do |file|
|
File.open(SPDX_FOLDER_PATH/FILE_NAME, "wb") do |file|
|
||||||
file.write(json.read)
|
file.write(json.read)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if args.fail_if_changed?
|
return unless args.fail_if_changed?
|
||||||
|
|
||||||
Homebrew.failed = true
|
Homebrew.failed = true
|
||||||
system("git diff --stat --exit-code #{FILE_NAME}")
|
system("git diff --stat --exit-code #{FILE_NAME}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user