homebrew-cask/Casks/a/alfred.rb

35 lines
1.2 KiB
Ruby

cask "alfred" do
version "5.5,2257"
sha256 "eed7e21b531f3974ccd440f1cc56ba3ce6a2fed2d413864a9c4a4e6f2a637b54"
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"
regex(/Alfred[._-]v?(\d(?:\.\d+)+)[._-](\d+)\.tar\.gz/i)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
end
end
auto_updates true
depends_on macos: ">= :mojave"
app "Alfred #{version.major}.app"
uninstall quit: "com.runningwithcrayons.Alfred",
login_item: "Alfred#{version.major}"
zap trash: [
"~/Library/Application Support/Alfred",
"~/Library/Caches/com.runningwithcrayons.Alfred",
"~/Library/Cookies/com.runningwithcrayons.Alfred.binarycookies",
"~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist",
"~/Library/Preferences/com.runningwithcrayons.Alfred.plist",
"~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState",
]
end