
- Use default `custom-prefix` label on macOS ARM (as `/usr/local` is not the default). - Add architecture (or Rosetta) to analytics event label. - Don't send minor versions on Big Sur. - Remove defunct `HOMEBREW_OSX_VERSION` reference.
29 lines
504 B
Ruby
29 lines
504 B
Ruby
# typed: strict
|
|
# frozen_string_literal: true
|
|
|
|
module Utils
|
|
module Analytics
|
|
class << self
|
|
extend T::Sig
|
|
|
|
sig { returns(String) }
|
|
def custom_prefix_label
|
|
return generic_custom_prefix_label if Hardware::CPU.arm?
|
|
|
|
"non-/usr/local"
|
|
end
|
|
|
|
sig { returns(String) }
|
|
def arch_label
|
|
if Hardware::CPU.arm?
|
|
"ARM"
|
|
elsif Hardware::CPU.in_rosetta2?
|
|
"Rosetta"
|
|
else
|
|
""
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|