mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Use hashes of arrays instead
This commit is contained in:
parent
b44ec56267
commit
e47bc2fb86
@ -69,7 +69,7 @@ module Homebrew
|
|||||||
File.write("_data/formula_canonical.json", "#{canonical_json}\n") unless args.dry_run?
|
File.write("_data/formula_canonical.json", "#{canonical_json}\n") unless args.dry_run?
|
||||||
|
|
||||||
OnSystem::VALID_OS_ARCH_TAGS.each do |bottle_tag|
|
OnSystem::VALID_OS_ARCH_TAGS.each do |bottle_tag|
|
||||||
variation_formulae = all_formulae.map do |_, formula|
|
variation_formulae = all_formulae.to_h do |name, formula|
|
||||||
formula = Homebrew::API.merge_variations(formula, bottle_tag:)
|
formula = Homebrew::API.merge_variations(formula, bottle_tag:)
|
||||||
|
|
||||||
version = Version.new(formula.dig("versions", "stable"))
|
version = Version.new(formula.dig("versions", "stable"))
|
||||||
@ -78,7 +78,7 @@ module Homebrew
|
|||||||
sha256 = formula.dig("bottle", "stable", "files", :all, "sha256")
|
sha256 = formula.dig("bottle", "stable", "files", :all, "sha256")
|
||||||
sha256 ||= formula.dig("bottle", "stable", "files", bottle_tag.to_sym, "sha256")
|
sha256 ||= formula.dig("bottle", "stable", "files", bottle_tag.to_sym, "sha256")
|
||||||
|
|
||||||
[formula["name"], pkg_version.to_s, rebuild, sha256]
|
[name, [pkg_version.to_s, rebuild, sha256]]
|
||||||
end
|
end
|
||||||
|
|
||||||
unless args.dry_run?
|
unless args.dry_run?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user