From 60585164a91b35a03d83a30fb3b58a676cc5ac36 Mon Sep 17 00:00:00 2001 From: Klaus Hipp Date: Wed, 25 Dec 2024 21:05:44 +0100 Subject: [PATCH 1/3] magicavoxel: update livecheck --- Casks/m/magicavoxel.rb | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Casks/m/magicavoxel.rb b/Casks/m/magicavoxel.rb index 1f5561473917..d0c5f3b6b910 100644 --- a/Casks/m/magicavoxel.rb +++ b/Casks/m/magicavoxel.rb @@ -1,15 +1,33 @@ cask "magicavoxel" do - version "0.99.6.2" + version "0.99.6.2,0.99.6" sha256 "4ee661e41da07f8c2b2b1c916bd1e18f7c5229900f30467eeea73ad74e861226" - url "https://github.com/ephtracy/ephtracy.github.io/releases/download/#{version.major_minor_patch}/MagicaVoxel-#{version}-macos-10.15.zip", + url "https://github.com/ephtracy/ephtracy.github.io/releases/download/#{version.csv.second || version.csv.first}/MagicaVoxel-#{version.csv.first}-macos-10.15.zip", verified: "github.com/ephtracy/ephtracy.github.io/" name "MagicaVoxel" desc "8-bit 3D voxel editor and interactive path tracing renderer" homepage "https://ephtracy.github.io/" + # Upstream doesn't provide a macOS file with every release, so we have to + # check multiple GitHub releases instead of only the "latest" one. livecheck do - skip "No reliable way to get version info" + url :url + regex(/MagicaVoxel[._-]v?(\d+(?:\.\d+)+)[._-]macos[._-]10.15\.zip/i) + strategy :github_releases do |json, regex| + json.map do |release| + next if release["draft"] + + tag_version = release["tag_name"]&.[](/^v?(\d+(?:\.\d+)+)$/i, 1) + next if tag_version.blank? + + release["assets"]&.map do |asset| + match = asset["name"]&.match(regex) + next if match.blank? + + (match[1] == tag_version) ? tag_version : "#{match[1]},#{tag_version}" + end + end.flatten + end end suite staged_path, target: "MagicaVoxel" From a5cec9bb2e6592f6c7f201b1ea53745617b0f86b Mon Sep 17 00:00:00 2001 From: Klaus Hipp Date: Wed, 25 Dec 2024 21:39:37 +0100 Subject: [PATCH 2/3] audit_exceptions/github_prerelease_allowlist.json: add magicavoxel --- audit_exceptions/github_prerelease_allowlist.json | 1 + 1 file changed, 1 insertion(+) diff --git a/audit_exceptions/github_prerelease_allowlist.json b/audit_exceptions/github_prerelease_allowlist.json index 223e35f2cb9d..53d948468af8 100644 --- a/audit_exceptions/github_prerelease_allowlist.json +++ b/audit_exceptions/github_prerelease_allowlist.json @@ -27,6 +27,7 @@ "jenkins-menu": "all", "keka@beta": "all", "kitty@nightly": "all", + "magicavoxel": "all", "messenger-native": "all", "mongotron": "all", "mullvadvpn@beta": "all", From 70562ac7d62ce6c20969d7b0cf3bbfbb5a89e6ef Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Thu, 26 Dec 2024 11:19:14 -0800 Subject: [PATCH 3/3] Update Casks/m/magicavoxel.rb Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com> --- Casks/m/magicavoxel.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Casks/m/magicavoxel.rb b/Casks/m/magicavoxel.rb index d0c5f3b6b910..75e23dd94fe0 100644 --- a/Casks/m/magicavoxel.rb +++ b/Casks/m/magicavoxel.rb @@ -12,7 +12,7 @@ # check multiple GitHub releases instead of only the "latest" one. livecheck do url :url - regex(/MagicaVoxel[._-]v?(\d+(?:\.\d+)+)[._-]macos[._-]10.15\.zip/i) + regex(/MagicaVoxel[._-]v?(\d+(?:\.\d+)+)[._-]macos.*?\.zip/i) strategy :github_releases do |json, regex| json.map do |release| next if release["draft"]