Skip to content

Commit

Permalink
Merge pull request #189108 from Homebrew/update-qsync-client
Browse files Browse the repository at this point in the history
qsync-client: update livecheck
  • Loading branch information
samford authored Oct 19, 2024
2 parents 7727232 + 6ef6a4a commit e5a68b7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Casks/q/qsync-client.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
cask "qsync-client" do
version "5.1.3.0913"
version "5.1.3,0913"
sha256 "901ce3c9fd1fa6b0001fa84fd3be1e8f0865c7f9aa068898aadffd34e7acbb2e"

url "https://download.qnap.com/Storage/Utility/QNAPQsyncClientMac-#{version}.dmg"
url "https://download.qnap.com/Storage/Utility/QNAPQsyncClientMac-#{version.csv.first}.#{version.csv.second}.dmg"
name "Qnap Qsync"
desc "Automatic file synchronisation"
homepage "https://www.qnap.com/en/utilities/essentials#utliity_3"

livecheck do
url "https://update.qnap.com/SoftwareRelease.xml"
regex(/QNAPQsyncClientMac[._-]v?(\d+(?:\.\d+)+)\.dmg/i)
strategy :xml do |xml|
item = xml.elements["//application[productName[text()='Qsync']]/platform[platformName[text()='Mac']]/software"]
next if item.blank?

version = item.elements["version"]&.text&.strip
build = item.elements["buildNumber"]&.text&.strip
next if version.blank? || build.blank?

"#{version},#{build}"
end
end

installer manual: "Qsync Client.pkg"
Expand Down

0 comments on commit e5a68b7

Please sign in to comment.