From bfe443baa86a60328bf36ddd0db9406232ddf3bc Mon Sep 17 00:00:00 2001 From: Bevan Kay Date: Mon, 8 Jan 2024 10:13:40 +1100 Subject: [PATCH] prettyclean: update `arch` conditionals --- Casks/p/prettyclean.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Casks/p/prettyclean.rb b/Casks/p/prettyclean.rb index 7bab258009..99ba006323 100644 --- a/Casks/p/prettyclean.rb +++ b/Casks/p/prettyclean.rb @@ -1,12 +1,12 @@ cask "prettyclean" do - arch arm: "aarch64", intel: "x86_64" - framework = on_arch_conditional arm: "aarch64", intel: "x64" + arch arm: "aarch64", intel: "x64" + arch_folder = on_arch_conditional arm: "aarch64", intel: "x86_64" version "0.1.38" sha256 arm: "1832d6ffdbe0fcbffe35c3b2f6ac4031e7e8ce93a7c564124914888ebfb43885", intel: "bc7512ff7544d8522ebd1ac0c13e94da8661dd6a5772bda33d68a9145be73436" - url "https://downloads.jmotor.org/prettyclean/v#{version}/darwin-#{arch}/PrettyClean_#{version}_#{framework}.dmg", + url "https://downloads.jmotor.org/prettyclean/v#{version}/darwin-#{arch_folder}/PrettyClean_#{version}_#{arch}.dmg", verified: "downloads.jmotor.org/" name "PrettyClean" desc "Easy to use Disk Cleanup Tools" @@ -14,13 +14,7 @@ cask "prettyclean" do livecheck do url "https://www.prettyclean.cc/en/download" - regex(/href=.*?PrettyClean[._-]v?(\d+(?:\.\d+)+)[._-]#{framework}\.dmg/i) - strategy :page_match do |page, regex| - match = page.match(regex) - next if match.blank? - - match[1] - end + regex(/href=.*?PrettyClean[._-]v?(\d+(?:\.\d+)+)[._-]#{arch}\.dmg/i) end depends_on macos: ">= :high_sierra"