cask "microsoft-edge@beta" do version "156.0.4314.15,8657c138-90fe-4964-bdc8-da7666226b3d" sha256 "980a126e7aef631bf821464e3274b6cced8db8e9e96aa5a16e891803953eb5f5" url "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/#{version.csv.second}/MicrosoftEdgeBeta-#{version.csv.first}.dmg" name "Microsoft Edge Beta" 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=2093294" regex(%r{/([^/]+)/MicrosoftEdgeBeta[._-]v?(\d+(?:\.\d+)+)\.dmg}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: :ventura app "Microsoft Edge Beta.app" uninstall launchctl: "com.microsoft.EdgeUpdater.wake", quit: "com.microsoft.edgemac.Beta" zap trash: [ "~/Library/Application Scripts/com.microsoft.edgemac.wdgExtension.Beta", "~/Library/Application Support/Microsoft Edge Beta", "~/Library/Application Support/Microsoft/EdgeUpdater", "~/Library/Caches/com.microsoft.edgemac.Beta", "~/Library/Caches/com.microsoft.EdgeUpdater", "~/Library/Caches/Microsoft Edge Beta", "~/Library/Containers/com.microsoft.edgemac.wdgExtension.Beta", "~/Library/HTTPStorages/com.microsoft.edgemac.Beta", "~/Library/HTTPStorages/com.microsoft.EdgeUpdater", "~/Library/LaunchAgents/com.microsoft.EdgeUpdater.*.plist", "~/Library/Microsoft/MicrosoftSoftwareUpdate/Actives/com.microsoft.edgemac.Beta", "~/Library/Preferences/com.microsoft.edgemac.Beta.plist", "~/Library/Saved Application State/com.microsoft.edgemac.Beta.savedState", "~/Library/WebKit/com.microsoft.edgemac.Beta", ], rmdir: [ "~/Library/Application Support/Microsoft", "~/Library/Microsoft", ] end