cask "gramps" do arch arm: "Arm", intel: "Intel" version "5.2.3,1" sha256 arm: "05b9fb71ccff93dec27d8dd3e73551b4b235f3b8e36abe520ca7c1da5ee9aabe", intel: "43e7e4da029942eb78cc6b8cb8a2f1905fa13a68c6e8870feacc3498baf10e38" url "https://github.com/gramps-project/gramps/releases/download/v#{version.csv.first}/Gramps-#{arch}-#{version.csv.first}-#{version.csv.second}.dmg", verified: "github.com/gramps-project/gramps/" name "Gramps" desc "Genealogy software" homepage "https://gramps-project.org/blog/" livecheck do url :url regex(/^Gramps[._-]#{arch}[._-]v?(\d+(?:.\d+)+)[._-](\d+)\.dmg$/i) strategy :github_releases do |json, regex| json.map do |release| next if release["draft"] || release["prerelease"] release["assets"]&.map do |asset| match = asset["name"]&.match(regex) next if match.blank? "#{match[1]},#{match[2]}" end end.flatten end end app "Gramps.app" zap trash: [ "~/Library/Application Support/gramps", "~/Library/Preferences/org.gramps-project.gramps.plist", "~/Library/Saved Application State/org.gramps-project.gramps.savedState", ] end