cask "gnucash" do arch arm: "Arm", intel: "Intel" version "5.12-1" sha256 arm: "a1f7454d07bfb536e641ccf9423b51f00dbd2374d8097d5ac5b918159832cc37", intel: "090d197df67926823360ee8bfaacffa60c10f467036080fd2a83f9f96bdebc40" url "https://github.com/Gnucash/gnucash/releases/download/#{version.hyphens_to_dots.major_minor}/Gnucash-#{arch}-#{version}.dmg", verified: "github.com/Gnucash/gnucash/" name "GnuCash" desc "Double-entry accounting program" homepage "https://www.gnucash.org/" livecheck do url :url regex(/^Gnucash-#{arch}[._-]v?(\d+(?:[.-]\d+)+)\.dmg$/i) strategy :github_latest do |json, regex| json["assets"]&.map do |asset| match = asset["name"]&.match(regex) next if match.blank? match[1] end end end depends_on macos: ">= :high_sierra" app "Gnucash.app" zap trash: [ "~/Library/Application Support/Gnucash", "~/Library/Preferences/org.gnucash.Gnucash.plist", "~/Library/Saved Application State/org.gnucash.Gnucash.savedState", ] end