software_spec: change BottleSpecification#checksums to return array

This commit is contained in:
Seeker 2021-01-21 22:52:26 -08:00
parent 3c84e1fef3
commit 8693ca4e4d
2 changed files with 3 additions and 6 deletions

View File

@ -30,11 +30,9 @@ BOTTLE_ERB = <<-EOS
<% if rebuild.positive? %>
rebuild <%= rebuild %>
<% end %>
<% checksums.each do |checksum_type, checksum_values| %>
<% checksum_values.each do |checksum_value| %>
<% checksums.each do |checksum_value| %>
<% checksum, macos = checksum_value.shift %>
<%= checksum_type %> "<%= checksum %>" => :<%= macos %>
<% end %>
sha256 "<%= checksum %>" => :<%= macos %>
<% end %>
end
EOS

View File

@ -439,13 +439,12 @@ class BottleSpecification
# Sort non-MacOS tags below MacOS tags.
"0.#{tag}"
end
sha256s = tags.reverse.map do |tag|
tags.reverse.map do |tag|
{
collector[tag][:checksum] => tag,
cellar: collector[tag][:cellar],
}
end
{ sha256: sha256s }
end
end