Use hashes of arrays instead

This commit is contained in:
Rylan Polster 2025-06-05 03:15:44 -04:00
parent b44ec56267
commit e47bc2fb86
No known key found for this signature in database

View File

@ -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?