Skip to content

Commit d692bcf

Browse files
committed
fix livecheck
1 parent f62a1f8 commit d692bcf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Casks/o/openrgb.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
intel: "fb1b000293ecd2981134fdc6b26e9453c9db33977a0442a82605ec4f7ab2e5ef"
77

88
url "https://codeberg.org/OpenRGB/OpenRGB/releases/download/release_candidate_#{version.csv.first}/OpenRGB_#{version.csv.first}_MacOS_#{arch}_#{version.csv.second}.zip",
9-
verified: "codeberg.org/OpenRGB/OpenRGB/"
9+
verified: "codeberg.org/"
1010
name "OpenRGB"
1111
desc "Open source RGB lighting control that doesn't depend on manufacturer software"
1212
homepage "https://openrgb.org/"
1313

14+
# TODO: Remove the `(?:rc\d*)?` part of this regex when updating to the next
15+
# stable version, so we only match stable versions going forward.
1416
livecheck do
15-
url "https://codeberg.org/OpenRGB/OpenRGB/releases"
16-
strategy :page_match do |page|
17-
match = page.match(%r{href=.*?/release_candidate_(\d+(?:\.\d+)*rc\d+)/OpenRGB_.*?_MacOS_#{arch}_(\h+)\.zip}i)
18-
next if match.nil?
19-
20-
"#{match[1]},#{match[2]}"
17+
url "https://openrgb.org/releases.html"
18+
regex(/href=.*?OpenRGB[._-]v?(\d+(?:\.\d+)+(?:rc\d*)?)[._-]MacOS[._-]#{arch}[._-](\h+)\.zip/i)
19+
strategy :page_match do |page, regex|
20+
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
2121
end
2222
end
2323

0 commit comments

Comments
 (0)