From 978806175a61dc9a110092c89e2245884f75372b Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Thu, 28 Sep 2023 18:45:06 -0700 Subject: [PATCH] virtualbuddy 1.3 --- Casks/v/virtualbuddy.rb | 20 ++++++++++++++++--- .../github_prerelease_allowlist.json | 1 - 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Casks/v/virtualbuddy.rb b/Casks/v/virtualbuddy.rb index 0899d7a360..ca0f92e758 100644 --- a/Casks/v/virtualbuddy.rb +++ b/Casks/v/virtualbuddy.rb @@ -1,6 +1,6 @@ cask "virtualbuddy" do - version "1.2.2,10" - sha256 "953428b48ac48652edf8935a0d7f0042aaaa2f8ca7303f86add3ceaedfb9c1cf" + version "1.3,104" + sha256 "c05f6a29444ed5154efcc158eb687738299aaddf4840445592ac0d287986baae" url "https://github.com/insidegui/VirtualBuddy/releases/download/#{version.csv.first}/VirtualBuddy_v#{version.csv.first}-#{version.csv.second}.dmg" name "VirtualBuddy" @@ -8,7 +8,21 @@ cask "virtualbuddy" do homepage "https://github.com/insidegui/VirtualBuddy" livecheck do - skip "No reliable way to get version info" + url "https://github.com/insidegui/VirtualBuddy/releases/latest" + regex(/href=.*VirtualBuddy[._-]v?(\d+(?:\.\d+)+)[._-]((\d+))\.dmg/i) + strategy :header_match do |headers, regex| + next if headers["location"].blank? + + # Identify the latest tag from the response's `location` header + latest_tag = File.basename(headers["location"]) + next if latest_tag.blank? + + # Fetch the assets list HTML for the latest tag and match within it + assets_page = Homebrew::Livecheck::Strategy.page_content( + @url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"), + ) + assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" } + end end conflicts_with cask: "homebrew/cask-versions/virtualbuddy-beta" diff --git a/audit_exceptions/github_prerelease_allowlist.json b/audit_exceptions/github_prerelease_allowlist.json index 7d64476ae9..9a7b51e85e 100644 --- a/audit_exceptions/github_prerelease_allowlist.json +++ b/audit_exceptions/github_prerelease_allowlist.json @@ -31,7 +31,6 @@ "strawberry-wallpaper": "all", "themeengine": "all", "universal-android-debloater": "all", - "virtualbuddy": "all", "xit": "all", "ytmdesktop-youtube-music": "all" }