excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / k / keybase.rb
blob42d8cd38bb93aa4949a60ee8320868f0a42f8f4b
1 cask "keybase" do
2   arch arm: "arm64-"
4   on_arm do
5     version "6.5.0,20241007140341,f10651d043"
6     sha256 "be6938cc738e5bfa38d4cfacbf202085892231880cbc98f39675ecd625e989fd"
7   end
8   on_intel do
9     version "6.5.0,20241007134954,f10651d043"
10     sha256 "3fa2755d5ab50099ce48b25dc51b3a1b45012e4b82a2e63809107c4d090753ec"
11   end
13   url "https://prerelease.keybase.io/darwin-#{arch}updates/Keybase-#{version.csv.first}-#{version.csv.second}%2B#{version.csv.third}.zip"
14   name "Keybase"
15   desc "End-to-end encryption software"
16   homepage "https://keybase.io/"
18   livecheck do
19     url "https://prerelease.keybase.io/update-darwin-#{arch}prod-v2.json"
20     strategy :json do |json|
21       json["version"]&.tr("-+", ",")
22     end
23   end
25   auto_updates true
27   app "Keybase.app"
29   postflight do
30     system_command "#{appdir}/Keybase.app/Contents/SharedSupport/bin/keybase",
31                    args: ["install-auto"]
32   end
34   uninstall launchctl: "keybase.Helper",
35             signal:    [
36               ["TERM", "keybase.Electron"],
37               ["TERM", "keybase.ElectronHelper"],
38               ["KILL", "keybase.Electron"],
39               ["KILL", "keybase.ElectronHelper"],
40             ],
41             script:    {
42               executable: "#{appdir}/Keybase.app/Contents/SharedSupport/bin/keybase",
43               args:       ["uninstall"],
44             },
45             delete:    [
46               "/Library/Logs/keybase*",
47               "/Library/PrivilegedHelperTools/keybase.Helper",
48             ]
50   zap trash: [
51         "~/Library/Application Support/Keybase",
52         "~/Library/Caches/Keybase",
53         "~/Library/Group Containers/keybase",
54         "~/Library/Logs/Keybase*",
55         "~/Library/Preferences/keybase*",
56       ],
57       rmdir: "/keybase"
58 end