62 lines
1.8 KiB
Ruby
62 lines
1.8 KiB
Ruby
cask "keybase" do
|
|
arch arm: "arm64-"
|
|
|
|
on_arm do
|
|
version "6.0.4,20230113195947,6e1343b357"
|
|
sha256 "f1bd79665b11a392f1b48c595e42442f593126ed0ffe1c862c71d7f7de87f99d"
|
|
end
|
|
on_intel do
|
|
version "6.0.4,20230113191846,6e1343b357"
|
|
sha256 "eaaeb2797f81375ddea1de92b8f1ec41b8110a684804a802a27ad2a5ec65f9ef"
|
|
end
|
|
|
|
url "https://prerelease.keybase.io/darwin-#{arch}updates/Keybase-#{version.csv.first}-#{version.csv.second}%2B#{version.csv.third}.zip"
|
|
name "Keybase"
|
|
desc "End-to-end encryption software"
|
|
homepage "https://keybase.io/"
|
|
|
|
livecheck do
|
|
url "https://prerelease.keybase.io/update-darwin-#{arch}prod-v2.json"
|
|
strategy :page_match do |page|
|
|
match = page.match(/Keybase[._-]v?(\d+(?:\.\d+)+)[._-](\d+)%2B([0-9a-f]+)\.zip/i)
|
|
next if match.blank?
|
|
|
|
"#{match[1]},#{match[2]},#{match[3]}"
|
|
end
|
|
end
|
|
|
|
auto_updates true
|
|
|
|
app "Keybase.app"
|
|
|
|
postflight do
|
|
system_command "#{appdir}/Keybase.app/Contents/SharedSupport/bin/keybase",
|
|
args: ["install-auto"]
|
|
end
|
|
|
|
uninstall delete: [
|
|
"/Library/Logs/keybase*",
|
|
"/Library/PrivilegedHelperTools/keybase.Helper",
|
|
],
|
|
launchctl: "keybase.Helper",
|
|
signal: [
|
|
["TERM", "keybase.Electron"],
|
|
["TERM", "keybase.ElectronHelper"],
|
|
["KILL", "keybase.Electron"],
|
|
["KILL", "keybase.ElectronHelper"],
|
|
],
|
|
script: {
|
|
executable: "#{appdir}/Keybase.app/Contents/SharedSupport/bin/keybase",
|
|
args: ["uninstall"],
|
|
}
|
|
|
|
zap trash: [
|
|
"~/Library/Application Support/Keybase",
|
|
"~/Library/Caches/Keybase",
|
|
"~/Library/Group Containers/keybase",
|
|
"~/Library/Logs/Keybase*",
|
|
"~/Library/Preferences/keybase*",
|
|
],
|
|
rmdir: "/keybase"
|
|
end
|