Merge pull request #194004 from Homebrew/bump-binance-1.54.4
[Homebrew/homebrew-cask.git] / Casks / m / microsoft-auto-update.rb
bloba919932e5088de867ef85cb6323973dc2befab9e
1 cask "microsoft-auto-update" do
2   on_el_capitan :or_older do
3     version "4.40.21101001"
4     sha256 "f638f7e0da9ee659c323f2ede0f176804bfe9a615a8f8b6320bd2e69d91ef2b2"
5   end
6   on_sierra do
7     version "4.51.22091101"
8     sha256 "ea9e59eb60604ad9785cb0c81bd490de5c7d32527f1da7064d4f77226e2dc907"
9   end
10   on_high_sierra do
11     version "4.63.23091003"
12     sha256 "abde56323f4753a90a99ca26a3c62060a498328bd90e0421395ec14a47d49101"
13   end
14   on_mojave :or_newer do
15     version "4.76.24101387"
16     sha256 "91fed0b500d85daf6e453bb7b2bee2948973781475c118c03c837e819a290fcc"
17   end
19   url "https://officecdnmac.microsoft.com/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/Microsoft_AutoUpdate_#{version}_Updater.pkg"
20   name "Microsoft Auto Update"
21   desc "Provides updates to various Microsoft products"
22   homepage "https://docs.microsoft.com/officeupdates/release-history-microsoft-autoupdate"
24   livecheck do
25     url "https://go.microsoft.com/fwlink/?linkid=830196"
26     regex(/Microsoft[._-]AutoUpdate[._-]v?(\d+(?:\.\d+)+)[._-]Updater\.pkg/i)
27     strategy :header_match
28   end
30   auto_updates true
32   pkg "Microsoft_AutoUpdate_#{version}_Updater.pkg"
34   uninstall launchctl: [
35               "com.microsoft.autoupdate.helper",
36               "com.microsoft.autoupdate.helpertool",
37               "com.microsoft.update.agent",
38             ],
39             quit:      [
40               "com.microsoft.autoupdate.fba",
41               "com.microsoft.autoupdate2",
42               "com.microsoft.errorreporting",
43             ],
44             pkgutil:   [
45               "com.microsoft.package.Microsoft_AU_Bootstrapper.app",
46               "com.microsoft.package.Microsoft_AutoUpdate.app",
47             ],
48             delete:    [
49               "/Library/Caches/com.microsoft.autoupdate.fba",
50               "/Library/Caches/com.microsoft.autoupdate.helper",
51               "/Library/LaunchDaemons/com.microsoft.autoupdate.helper.plist",
52               "/Library/Preferences/com.microsoft.autoupdate2.plist",
53               "/Library/PrivilegedHelperTools/com.microsoft.autoupdate.helper",
54             ]
56   zap trash: [
57         "~/Library/Application Support/Microsoft AutoUpdate",
58         "~/Library/Caches/com.microsoft.autoupdate.fba",
59         "~/Library/Caches/com.microsoft.autoupdate2",
60         "~/Library/Caches/Microsoft/uls/com.microsoft.autoupdate.fba",
61         "~/Library/Caches/Microsoft/uls/com.microsoft.autoupdate2",
62         "~/Library/Cookies/com.microsoft.autoupdate.fba.binarycookies",
63         "~/Library/Cookies/com.microsoft.autoupdate2.binarycookies",
64         "~/Library/HTTPStorages/com.microsoft.autoupdate.fba",
65         "~/Library/HTTPStorages/com.microsoft.autoupdate2",
66         "~/Library/Preferences/com.microsoft.autoupdate.fba.plist",
67         "~/Library/Preferences/com.microsoft.autoupdate2.plist",
68         "~/Library/Saved Application State/com.microsoft.autoupdate2.savedState",
69       ],
70       rmdir: [
71         "~/Library/Caches/Microsoft",
72         "~/Library/Caches/Microsoft/uls",
73       ]
74 end