cask "keyguard" do arch arm: "apple", intel: "intel" version "1.6.4,20241102" sha256 arm: "92cb4ef9ea0cb4b9db636bf9499be9a7b27a6627890eef6b97a304e6babec681", intel: "3997c9e5fc897d90c6b19ee5e2efba046988b976ba05bbe91a6dd153fc7c141b" url "https://github.com/AChep/keyguard-app/releases/download/r#{version.csv.second}/Keyguard-#{version.csv.first}-#{arch}.dmg" name "Keyguard" desc "Client for the Bitwarden platform" homepage "https://github.com/AChep/keyguard-app" livecheck do url :url regex(%r{/r?(\d+(?:\.\d+)*)/Keyguard[._-](\d+(?:\.\d+)+)[._-]#{arch}\.dmg}i) strategy :github_latest do |json, regex| json["assets"]&.map do |asset| match = asset["browser_download_url"]&.match(regex) next if match.blank? "#{match[2]},#{match[1]}" end end end depends_on macos: ">= :high_sierra" app "keyguard.app" zap trash: [ "~/Library/Application Support/keyguard", "~/Library/Saved Application State/com.artemchep.keyguard.savedState", ] end