formula-analytics: reduce noise from Linux builds

Frequent Linux builds add a number of low count unique OS variations to
analytics, so compress into a major version for displaying
This commit is contained in:
Justin Krehel 2025-08-19 21:42:19 -04:00
parent 033138638f
commit 1f0ddcc791
No known key found for this signature in database
GPG Key ID: 757F1864C8CF3605

View File

@ -384,6 +384,10 @@ module Homebrew
when /Fedora Linux (\d+)[.\d]*/ then "Fedora Linux #{Regexp.last_match(1)}"
when /KDE neon .*?([\d.]+)/ then "KDE neon #{Regexp.last_match(1)}"
when /Amazon Linux (\d+)\.[.\d]*/ then "Amazon Linux #{Regexp.last_match(1)}"
when /Fedora Linux Rawhide[.\dn]*/ then "Fedora Linux Rawhide"
when /Red Hat Enterprise Linux CoreOS (\d+\.\d+)[-.\d]*/
"Red Hat Enterprise Linux CoreOS #{Regexp.last_match(1)}"
when /([A-Za-z ]+)\s+(\d+)\.\d{8}[.\d]*/ then "#{Regexp.last_match(1)} #{Regexp.last_match(2)}"
else dimension
end
end