cask "calhash" do sha256 :no_check # NOTE: We use separate `url` values in each of the macOS on_system blocks # so that the API data correctly includes URL variants for each. on_sequoia :or_older do on_big_sur :or_older do version "1.1.1" url "https://www.titanium-software.fr/download/11/CalHash.dmg" end on_monterey do version "1.1.9" url "https://www.titanium-software.fr/download/12/CalHash.dmg" end on_ventura do version "1.2.1" url "https://www.titanium-software.fr/download/13/CalHash.dmg" end on_sonoma do version "1.3.4" url "https://www.titanium-software.fr/download/14/CalHash.dmg" end on_sequoia do version "1.4.6" url "https://www.titanium-software.fr/download/15/CalHash.dmg" end livecheck do skip "Legacy version" end end on_tahoe :or_newer do version "1.5.8" url "https://www.titanium-software.fr/download/26/CalHash.dmg" # We check the version on the homepage, as the version in the related plist # file can be out of date. livecheck do url :homepage regex(/>\s*CalHash\s+v?(\d+(?:\.\d+)+)\s+for\s+[\w\s]*26\s*