cask "microsoft-edge@dev" do linkid = on_arch_conditional arm: "2099619", intel: "2069340" on_arm do version "132.0.2945.0,91e66614-ce00-4f58-86bb-ee91e1f49cb1" sha256 "fae9c0b23713994b1d41fe8cf5fd061f7508ef8c306d065222dcaf8db879294c" end on_intel do version "132.0.2945.0,28bbdb1d-0d5b-4db7-bc47-a3461143387c" sha256 "e1be850690c0b782eb91ef55bd44601792d990b9da342016dc99291aaefee567" end url "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/#{version.csv.second}/MicrosoftEdgeDev-#{version.csv.first}.pkg" name "Microsoft Edge Dev" desc "Multi-platform web browser" homepage "https://www.microsoft.com/en-us/edge/download/insider?form=" livecheck do url "https://go.microsoft.com/fwlink/?linkid=#{linkid}" regex(%r{/([^/]+)/MicrosoftEdgeDev[._-]v?(\d+(?:\.\d+)+)\.pkg}i) strategy :header_match do |headers, regex| match = headers["location"]&.match(regex) next if match.blank? "#{match[2]},#{match[1]}" end end auto_updates true depends_on macos: ">= :big_sur" pkg "MicrosoftEdgeDev-#{version.csv.first}.pkg", choices: [ { "choiceIdentifier" => "com.microsoft.package.Microsoft_AutoUpdate.app", # Office16_all_autoupdate.pkg "choiceAttribute" => "selected", "attributeSetting" => 0, }, ] uninstall launchctl: [ "com.microsoft.EdgeUpdater.update-internal.109.0.1518.89.system", "com.microsoft.EdgeUpdater.update.system", "com.microsoft.EdgeUpdater.wake.system", ], pkgutil: "com.microsoft.edgemac.Dev" zap delete: "/Library/Application Support/Microsoft/EdgeUpdater", trash: [ "~/Library/Application Scripts/com.microsoft.edgemac.wdgExtension.Dev", "~/Library/Application Support/Microsoft Edge Dev", "~/Library/Caches/com.microsoft.edgemac.Dev", "~/Library/Caches/Microsoft Edge Dev", "~/Library/Containers/com.microsoft.edgemac.wdgExtension.Dev", "~/Library/HTTPStorages/com.microsoft.edgemac.Dev", "~/Library/LaunchAgents/com.microsoft.EdgeUpdater.*.plist", "~/Library/Microsoft/MicrosoftSoftwareUpdate/Actives/com.microsoft.edgemac.Dev", "~/Library/Preferences/com.microsoft.edgemac.Dev.plist", "~/Library/Saved Application State/com.microsoft.edgemac.Dev.savedState", "~/Library/WebKit/com.microsoft.edgemac.Dev", ], rmdir: [ "/Library/Application Support/Microsoft", "~/Library/Microsoft", ] end