pitch: update livecheck (#123188)

This commit is contained in:
Sam Ford
2022-05-11 11:13:32 +08:00
committed by GitHub
parent 8b0632770f
commit 2e24a848f6
+3 -5
View File
@@ -9,11 +9,9 @@ cask "pitch" do
livecheck do
url "https://desktop-app-builds.pitch.com/latest-mac.yml"
strategy :page_match do |page|
match = page.match(/Pitch[._-]v?(\d+(?:\.\d+)+)[._-]ci(\d+)\.dmg/i)
next if match.blank?
"#{match[1]},#{match[2]}"
regex(/Pitch[._-]v?(\d+(?:\.\d+)+).*?[._-]ci(\d+)\.dmg/i)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
end
end