Merge pull request #157140 from bevanjkay/bump-igv-2.16.2

igv: update livecheck
This commit is contained in:
BrewTestBot
2023-10-08 23:17:57 -07:00
committed by GitHub
+12 -1
View File
@@ -8,8 +8,19 @@ cask "igv" do
homepage "https://software.broadinstitute.org/software/igv/"
livecheck do
url "https://software.broadinstitute.org/software/igv/download"
url "https://data.broadinstitute.org/igv/projects/downloads/"
regex(/href=.*?IGV[._-]MacApp[._-]v?(\d+(?:\.\d+)+)\.zip/i)
strategy :page_match do |page, regex|
major_minor = page.scan(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i).max_by do |match|
Version.new(match.first)
end.first
next if major_minor.blank?
version_page = Homebrew::Livecheck::Strategy.page_content(url.sub(%r{/$}, "") + "/#{major_minor}/")
next if version_page[:content].blank?
version_page[:content].scan(regex).map(&:first)
end
end
app "IGV_#{version}.app"