From ac502164b59c4473791bad39fff8084c4df66695 Mon Sep 17 00:00:00 2001 From: Klaus Hipp Date: Wed, 18 Dec 2024 08:58:11 +0100 Subject: [PATCH] duplicati: update livecheck --- Casks/d/duplicati.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Casks/d/duplicati.rb b/Casks/d/duplicati.rb index 0caef232cc04..d7708e75abd1 100644 --- a/Casks/d/duplicati.rb +++ b/Casks/d/duplicati.rb @@ -1,18 +1,24 @@ cask "duplicati" do arch arm: "arm64", intel: "x64" - version "2.1.0.2_beta_2024-11-29" + version "2.1.0.2,2024-11-29" sha256 intel: "62045156094c0796c2d9631068ea6746ec24f704b166e8bdb36a0158ea7395af", arm: "fc69b70df98b8966731aeddd94abe15dae1e1033e405d47e4082e16789c2d8ac" - url "https://updates.duplicati.com/beta/duplicati-#{version}-osx-#{arch}-gui.dmg" + url "https://updates.duplicati.com/beta/duplicati-#{version.csv.first}_beta_#{version.csv.second}-osx-#{arch}-gui.dmg" name "Duplicati" desc "Store securely encrypted backups in the cloud" homepage "https://www.duplicati.com/" livecheck do - url "https://updates.duplicati.com/beta/latest-installers.js" - regex(/^\s+"name":\s+"duplicati[._-]v?(.+)\.dmg",$/i) + url "https://updates.duplicati.com/beta/latest-v2.manifest" + regex(/duplicati[._-]v?(\d+(?:\.\d+)+)[._-]beta[._-](\d+(?:[.-]\d+)+)[._-]osx[._-]#{arch}[._-]gui\.dmg/i) + strategy :page_match do |page, regex| + match = page.match(regex) + next if match.blank? + + "#{match[1]},#{match[2]}" + end end depends_on formula: "mono"