mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Fix distribution mapping checking in tools/version.rb (#12946)
Co-authored-by: Satadru Pramanik, DO, MPH, MEng <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
59871f7e38
commit
21ae5dfad5
@@ -116,9 +116,10 @@ def get_anitya_id(name, homepage)
|
||||
return if json2['total_items'].zero?
|
||||
|
||||
(0..(json2['total_items'] - 1)).each do |i|
|
||||
# Sometimes we use versions from other distributions, e.g., libdb
|
||||
# versioning comes from Fedora.
|
||||
# next unless json2['items'][i]['distribution'] == 'Chromebrew'
|
||||
# If it has it under a different name, make sure that is the Chromebrew mapping, and not some other distribution,
|
||||
# because that could lead to overmatching.
|
||||
next unless json2['items'][i]['distribution'] == 'Chromebrew'
|
||||
|
||||
return get_anitya_id(json2['items'][i]['project'], homepage) if json2['items'][i]['name'] == name.tr('-', '_')
|
||||
end
|
||||
else # Anitya has more than one package with this exact name.
|
||||
|
||||
Reference in New Issue
Block a user