Skip to content

Commit

Permalink
idrive: update livecheck, use versioned url
Browse files Browse the repository at this point in the history
  • Loading branch information
khipp committed Jul 5, 2024
1 parent 9c2d615 commit be3a695
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions Casks/i/idrive.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
cask "idrive" do
version "3.5.10.79"
sha256 :no_check
version "3.5.10.80,070624"
sha256 "231518ded3b6273e56ae68c98bfb068d90c6a7e836fa761f29ad8d402d243714"

url "https://www.idrive.com/downloads/IDrive.dmg"
url "https://static.idriveonlinebackup.com/downloads/#{version.csv.second}/IDrive.dmg",
verified: "static.idriveonlinebackup.com/downloads/"
name "iDrive"
desc "Cloud backup and storage solution"
homepage "https://www.idrive.com/"

livecheck do
url :url
strategy :extract_plist
url "https://static.idriveonlinebackup.com/downloads/version_mac.js"
strategy :page_match do |page|
version = page.match(/Version:?\s*(\d+(?:\.\d+)*)/i)
next if version.blank?

download_id = page.match(%r{downloads/(\w+)/}i)
next if download_id.blank?

"#{version[1]},#{download_id[1]}"
end
end

pkg "IDrive.pkg"

uninstall launchctl: [
"com.iDrive.FinderPluginApp",
"com.prosoftnet.DaemonHelper",
"IDriveDaemon",
"IDSyncDaemon",
"IDWifiManager",
Expand Down

0 comments on commit be3a695

Please sign in to comment.