From 2e24a848f6336cdde53a245cfec1948aee0adcdf Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Tue, 10 May 2022 23:13:32 -0400 Subject: [PATCH] pitch: update livecheck (#123188) --- Casks/pitch.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Casks/pitch.rb b/Casks/pitch.rb index c753dc04ae..5639eeeb41 100644 --- a/Casks/pitch.rb +++ b/Casks/pitch.rb @@ -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