mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
itk-snap: update version format, livecheck
This commit is contained in:
+9
-17
@@ -1,15 +1,9 @@
|
||||
cask "itk-snap" do
|
||||
arch arm: "arm64", intel: "x86_64"
|
||||
livecheck_arch = on_arch_conditional arm: "M1", intel: "Intel"
|
||||
|
||||
on_arm do
|
||||
version "4.0.2,13696"
|
||||
sha256 "aba01235a44b9080fae2c5cf0b35485f96b335f1a50442ee4fb941d4c4846501"
|
||||
end
|
||||
on_intel do
|
||||
version "4.0.2,13697"
|
||||
sha256 "333071f6703e6d3a8554fcc33f2a632cf3106a0bdc230893807a4c288e9e13da"
|
||||
end
|
||||
version "4.0.2"
|
||||
sha256 arm: "aba01235a44b9080fae2c5cf0b35485f96b335f1a50442ee4fb941d4c4846501",
|
||||
intel: "333071f6703e6d3a8554fcc33f2a632cf3106a0bdc230893807a4c288e9e13da"
|
||||
|
||||
url "https://downloads.sourceforge.net/itk-snap/itksnap-#{version.csv.first}-Darwin-#{arch}.dmg",
|
||||
verified: "downloads.sourceforge.net/itk-snap/"
|
||||
@@ -18,14 +12,12 @@ cask "itk-snap" do
|
||||
homepage "http://www.itksnap.org/pmwiki/pmwiki.php"
|
||||
|
||||
livecheck do
|
||||
url "http://www.itksnap.org/pmwiki/pmwiki.php?n=Main.Downloads"
|
||||
regex(%r{
|
||||
>\s*ITK-SNAP\s+v?(\d+(?:\.\d+)+)\s*<.*?
|
||||
/download/snap/register\.php\?[^"' >]*?link=(\d+)[^>]*?>
|
||||
\s*MacOS\s+Binary\s+\(#{livecheck_arch}\s+processor
|
||||
}imx)
|
||||
strategy :page_match do |page, regex|
|
||||
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
|
||||
url "https://sourceforge.net/projects/itk-snap/rss?path=/itk-snap"
|
||||
regex(%r{url=.*?/itksnap[._-]v?(\d+(?:\.\d+)+)(?:-(\d+(?:\.\d+)*))?[._-]Darwin[._-]#{arch}\.dmg}i)
|
||||
strategy :sourceforge do |page, regex|
|
||||
page.scan(regex).map do |match|
|
||||
match[1].present? ? "#{match[0]},#{match[1]}" : match[0]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user