cask "local" do arch arm: "-arm64" version "9.2.5,6810" sha256 arm: "fa2190b153fd57a6b213e696fdd5776e578cf85d25d53aec2f5b7b07c1d5d1cb", intel: "3f392ecea0143c7dd433411e9a2da3c5fdd0a52f0e1cba74f10dc9af98481877" url "https://cdn.localwp.com/releases-stable/#{version.csv.first}+#{version.csv.second}/local-#{version.csv.first}-mac#{arch}.dmg" name "Local" desc "WordPress local development tool by Flywheel" homepage "https://localwp.com/" livecheck do url "https://cdn.localwp.com/stable/latest/mac#{arch}" regex(%r{/(\d+(?:\.\d+)+)\+(\d+)/}i) strategy :header_match do |headers, regex| match = headers["location"]&.match(regex) next if match.blank? "#{match[1]},#{match[2]}" end end auto_updates true depends_on macos: ">= :catalina" app "Local.app" zap trash: [ "~/Library/Application Support/Local", "~/Library/Logs/local-lightning.log", "~/Library/Preferences/com.getflywheel.lightning.local.plist", "~/Library/Saved Application State/com.getflywheel.lightning.local.savedState", ] end