Do not remove unknown bottle tags

This commit is contained in:
Shaun Jackman 2016-11-18 16:45:13 -08:00
parent 3bcf80f651
commit 8a3481ee1d

View File

@ -336,20 +336,19 @@ class BottleSpecification
end end
def checksums def checksums
checksums = {} tags = collector.keys.sort_by do |tag|
os_versions = collector.keys # Sort non-MacOS tags below MacOS tags.
os_versions.map! do |macos|
begin begin
MacOS::Version.from_symbol macos MacOS::Version.from_symbol tag
rescue rescue
nil "0.#{tag}"
end end
end.compact! end
os_versions.sort.reverse_each do |os_version| checksums = {}
macos = os_version.to_sym tags.reverse_each do |tag|
checksum = collector[macos] checksum = collector[tag]
checksums[checksum.hash_type] ||= [] checksums[checksum.hash_type] ||= []
checksums[checksum.hash_type] << { checksum => macos } checksums[checksum.hash_type] << { checksum => tag }
end end
checksums checksums
end end