37 lines
1.2 KiB
Ruby
37 lines
1.2 KiB
Ruby
cask "alfred" do
|
|
version "5.0.6,2110"
|
|
sha256 "ce2638d6bf2f169e89f5515d51c92cdd2db8a9fd687462de41fc0b113bf34b9a"
|
|
|
|
url "https://cachefly.alfredapp.com/Alfred_#{version.csv.first}_#{version.csv.second}.dmg"
|
|
name "Alfred"
|
|
desc "Application launcher and productivity software"
|
|
homepage "https://www.alfredapp.com/"
|
|
|
|
livecheck do
|
|
url "https://www.alfredapp.com/app/update#{version.major}/general.xml"
|
|
strategy :page_match do |page|
|
|
match = page.match(/Alfred[._-]v?(\d(?:\.\d+)+)[._-](\d+)\.tar\.gz/i)
|
|
next if match.blank?
|
|
|
|
"#{match[1]},#{match[2]}"
|
|
end
|
|
end
|
|
|
|
auto_updates true
|
|
depends_on macos: ">= :mojave"
|
|
|
|
app "Alfred #{version.major}.app"
|
|
|
|
uninstall login_item: "Alfred#{version.major}",
|
|
quit: "com.runningwithcrayons.Alfred"
|
|
|
|
zap trash: [
|
|
"~/Library/Application Support/Alfred",
|
|
"~/Library/Caches/com.runningwithcrayons.Alfred",
|
|
"~/Library/Cookies/com.runningwithcrayons.Alfred.binarycookies",
|
|
"~/Library/Preferences/com.runningwithcrayons.Alfred.plist",
|
|
"~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist",
|
|
"~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState",
|
|
]
|
|
end
|