cask "morgen" do arch arm: "arm64", intel: "x64" version "3.6.0,241112ro2k2syaq" sha256 arm: "452ec78b906aeefc26a58dacf94c56a0fd08005c8a010075763922ce6780e65b", intel: "f965a4f19078e83752664be26be872e86dcd1e4c6b4db6d3440bfcd5441e94eb" url "https://download.todesktop.com/210203cqcj00tw1/Morgen%20#{version.csv.first}%20-%20Build%20#{version.csv.second}-#{arch}.dmg", verified: "download.todesktop.com/210203cqcj00tw1/" name "Morgen" desc "All-in-one calendars, tasks and scheduler" homepage "https://morgen.so/" livecheck do url "https://download.todesktop.com/210203cqcj00tw1/latest-mac.yml" regex(/Morgen\s+v?(\d+(?:\.\d+)+).*?(?:Build\s+)([a-z0-9]+)[._-]#{arch}\.dmg/i) strategy :electron_builder do |yaml, regex| yaml["files"]&.map do |item| match = item["url"]&.match(regex) next if match.blank? "#{match[1]},#{match[2]}" end end end depends_on macos: ">= :high_sierra" app "Morgen.app" zap trash: [ "~/Library/Application Support/Morgen", "~/Library/Preferences/com.todesktop.210203cqcj00tw1.plist", "~/Library/Saved Application State/com.todesktop.210203cqcj00tw1.savedState", ] end