Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update livechecks for GitHub API usage #146730

Merged
merged 51 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3bc3456
accord: fix livecheck for github API
SMillerDev May 8, 2023
063b829
bonitastudiocommunity: fix livecheck for github API
SMillerDev May 8, 2023
230ca87
btcpayserver-vault: fix livecheck for github API
SMillerDev May 8, 2023
e92f924
camera-live: fix livecheck for github API
SMillerDev May 8, 2023
85a2b79
chrysalis: fix livecheck for github API
SMillerDev May 8, 2023
5438305
desmume: fix livecheck for github API
SMillerDev May 8, 2023
ef6a6b6
elk: fix livecheck for github API
SMillerDev May 8, 2023
b2aa2ea
firefly: fix livecheck for github API
SMillerDev May 8, 2023
367fb58
fvim: fix livecheck for github API
SMillerDev May 8, 2023
c31f0dc
home-assistant: fix livecheck for github API
SMillerDev May 8, 2023
b30461d
flame: fix livecheck for github API
SMillerDev May 8, 2023
db8ce19
josm: fix livecheck for github API
SMillerDev May 8, 2023
de3d58d
hydrus-network: fix livecheck for github API
SMillerDev May 8, 2023
5b9d0e4
jupyterlab: fix livecheck for github API
SMillerDev May 8, 2023
17ca82d
lbry: fix livecheck for github API
SMillerDev May 8, 2023
0ac4705
mambaforge: fix livecheck for github API
SMillerDev May 8, 2023
01c891b
manyverse: fix livecheck for github API
SMillerDev May 8, 2023
71db22d
miniforge: fix livecheck for github API
SMillerDev May 8, 2023
9eff5ed
n1ghtshade: fix livecheck for github API
SMillerDev May 8, 2023
aa84a0b
only-switch: fix livecheck for github API
SMillerDev May 8, 2023
3e923e7
onlyoffice: fix livecheck for github API
SMillerDev May 8, 2023
6477c11
openrocket: fix livecheck for github API
SMillerDev May 8, 2023
8043b67
outline-manager: fix livecheck for github API
SMillerDev May 8, 2023
5b02113
pingnoo: fix livecheck for github API
SMillerDev May 8, 2023
caa7b78
plover: fix livecheck for github API
SMillerDev May 8, 2023
8078a92
processing: fix livecheck for github API
SMillerDev May 8, 2023
4f6a147
ricochet-refresh: fix livecheck for github API
SMillerDev May 8, 2023
8129dbe
sequel-ace: fix livecheck for github API
SMillerDev May 8, 2023
9eb2ee2
time-to-leave: fix livecheck for github API
SMillerDev May 8, 2023
6c56094
turtl: fix livecheck for github API
SMillerDev May 8, 2023
8f56a57
ubports-installer: fix livecheck for github API
SMillerDev May 8, 2023
e1d2c04
utm: fix livecheck for github API
SMillerDev May 8, 2023
a886238
vidcutter: fix livecheck for github API
SMillerDev May 8, 2023
84529fe
vimediamanager: fix livecheck for github API
SMillerDev May 8, 2023
3aad826
vine-server: fix livecheck for github API
SMillerDev May 8, 2023
ce99608
waterfox-classic: fix livecheck for github API
SMillerDev May 8, 2023
f63cb19
webots: fix livecheck for github API
SMillerDev May 8, 2023
c684aa9
wezterm: fix livecheck for github API
SMillerDev May 8, 2023
11b6d24
zesarux: fix livecheck for github API
SMillerDev May 8, 2023
549e4c6
desmume: update livecheck
samford May 8, 2023
8f289a6
extraterm: update livecheck
samford May 8, 2023
86fd26e
flame: update livecheck
samford May 8, 2023
e45ff26
fvim: update livecheck
samford May 8, 2023
63b9519
home-assistant: update livecheck
samford May 8, 2023
d56cf78
obs-websocket: update livecheck
samford May 8, 2023
ae7c374
processing: update livecheck
samford May 8, 2023
304b779
sequel-ace: update livecheck
samford May 8, 2023
f03145d
time-to-leave: update livecheck
samford May 8, 2023
4ea42c1
turtl: update livecheck
samford May 8, 2023
5f888bc
vine-server: update livecheck
samford May 8, 2023
8daab5f
wezterm: update livecheck
samford May 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Casks/accord.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?\.?(\d+(?:\.\d+)+)["' >]}i)
regex(/v?\.?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/bonitastudiocommunity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/[^"' >]*?(\d+(?:[.-]\d+)+(?:-\w+)?)["' >]}i)
regex(/(\d+(?:[.-]\d+)+(?:-\w+)?)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/btcpayserver-vault.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/Vault/v?(\d+(?:\.\d+)+)["' >]}i)
regex(/v?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/camera-live.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/v?(\d+)["' >]}i)
regex(/v?(\d+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/chrysalis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# tag in a different repository, which led to an incorrect version match.
livecheck do
url :url
regex(%r{href=.*?/Chrysalis/releases/tag/v?(\d+(?:\.\d+)+)["' >]}i)
regex(/v?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
6 changes: 3 additions & 3 deletions Casks/desmume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/[^"' >]*?(\d+(?:[._-]\d+)+[a-z]?)["' >]}i)
strategy :github_latest do |page, regex|
page.scan(regex).map { |match| match[0].tr("_", ".") }
regex(/^(?:release[._-])?(\d+(?:[._-]\d+)+[a-z]?)$/i)
strategy :github_latest do |json, regex|
json["tag_name"]&.scan(regex)&.map { |match| match[0].tr("_", ".") }
end
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/elk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/elk[._-]native[._-]v?(\d+(?:\.\d+)+)["' >]}i)
regex(/elk[._-]native[._-]v?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
8 changes: 6 additions & 2 deletions Casks/extraterm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
desc "Swiss army chainsaw of terminal emulators"
homepage "https://extraterm.org/"

# As of writing, upstream marks all releases on GitHub as "pre-release".
# This should be updated to use the `GithubLatest` strategy if/when stable
# versions become available.
livecheck do
url :url
strategy :github_latest
url "https://github.com/sedwards2009/extraterm/releases"
regex(%r{href=["']?[^"' >]*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
strategy :page_match
end

app "ExtratermQt.app"
Expand Down
2 changes: 1 addition & 1 deletion Casks/firefly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/desktop[._-]v?(\d+(?:\.\d+)+)["' >]}i)
regex(/desktop[._-]v?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
6 changes: 3 additions & 3 deletions Casks/flame.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+){1,2})(?:\s*[(._-](\d+)\)?)?["' >]}i)
strategy :github_latest do |page, regex|
page.scan(regex).map do |match|
regex(/^v?(\d+(?:\.\d+)+)(?:\((\d+)\))?$/i)
strategy :github_latest do |json, regex|
json["tag_name"]&.scan(regex)&.map do |match|
match[1].present? ? "#{match[0]},#{match[1]}" : match[0]
end
end
Expand Down
10 changes: 5 additions & 5 deletions Casks/fvim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

livecheck do
url :url
strategy :github_latest do |page|
match = page.match(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)\+(g?\h+)["' >]}i)
next if match.blank?

"#{match[1]},#{match[2]}"
regex(/^v?(\d+(?:\.\d+)+)(?:[+-](g?\h+))?$/i)
strategy :github_latest do |json, regex|
json["tag_name"]&.scan(regex)&.map do |match|
match[1].present? ? "#{match[0]},#{match[1]}" : match[0]
end
end
end

Expand Down
11 changes: 3 additions & 8 deletions Casks/home-assistant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@
desc "Companion app for Home Assistant home automation software"
homepage "https://companion.home-assistant.io/"

# We use the GitHubLatest strategy as Home Assistant also tags pre-releases, and
# we also specify a regex since tags are unconventional, e.g. `2021.2.2/2021.55`,
# and use a custom block to replace the slash with a comma in the resulting version
livecheck do
url :url
strategy :github_latest do |page|
version = page.match(%r{href=".+/tree/(?:mac|release)/([\d.]+)/([\d.]+)"}i)
next if version.blank?

"#{version[1]},#{version[2]}"
regex(%r{^(?:mac|release)/(\d+(?:\.\d+)+)/(\d+(?:\.\d+)*)}i)
strategy :github_latest do |json, regex|
json["tag_name"]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
end
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/hydrus-network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tree/v?(\d+(?:\.\d+)*[a-z]?)[^"' >]*?["' >]}i)
regex(/v?(\d+(?:\.\d+)*[a-z]?)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/josm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tree/\D*?(\d+(?:\.\d+)*)[^"' >]*?["' >]}i)
regex(/\D*?(\d+(?:\.\d+)*)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/jupyterlab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?(\d+(?:[.-]\d+)+)["' >]}i)
regex(/v?(\d+(?:[.-]\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/lbry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=.*?/lbry-desktop/releases/tag/v?(\d+(?:\.\d+)+)["' >]}i)
regex(/v?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/mambaforge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?(\d+(?:[._-]\d+)+)["' >]}i)
regex(/v?(\d+(?:[._-]\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/manyverse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/v?(\d+(?:\.\d+)+-beta)["' >]}i)
regex(/v?(\d+(?:\.\d+)+-beta)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/miniforge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

livecheck do
url :homepage
regex(%r{href=.*?/tag/v?(\d+(?:[.-]\d+)+)["' >]}i)
regex(/v?(\d+(?:[.-]\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/n1ghtshade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?([\w._-]+)["' >]}i)
regex(/v?([\w._-]+)/i)
strategy :github_latest
end

Expand Down
8 changes: 6 additions & 2 deletions Casks/obs-websocket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
desc "Remote-control OBS Studio through WebSockets"
homepage "https://github.com/obsproject/obs-websocket"

# Upstream has published releases for two different major versions, so the
# "latest" release may be for an older major version. Unless/until this is
# resolved, we have to check more than just the "latest" release.
livecheck do
url :url
strategy :github_latest
url "https://github.com/obsproject/obs-websocket/releases?q=prerelease%3Afalse"
regex(%r{href=["']?[^"' >]*?/tag/v?(\d+(?:\.\d+)+)[^"' >]*?["' >]}i)
strategy :page_match
end

pkg "obs-websocket-#{version}-macOS.pkg"
Expand Down
2 changes: 1 addition & 1 deletion Casks/only-switch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/release[._-]v?(\d+(?:\.\d+)+)["' >]}i)
regex(/release[._-]v?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/onlyoffice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/[^"' >]*?(\d+(?:\.\d+)+)["' >]}i)
regex(/(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/openrocket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?(?:release)?[._-]?(\d+(?:\.\d+)+)["'>]}i)
regex(/v?(?:release)?[._-]?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/outline-manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :stable
regex(%r{href=["']?[^"' >]*?/tag/(?:manager[._-])?v?(\d+(?:\.\d+)+)["' >]}i)
regex(/(?:manager[._-])?v?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/pingnoo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+-\w+)["' >]}i)
regex(/v?(\d+(?:\.\d+)+-\w+)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/plover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+[\w.]+)["' >]}i)
regex(/v?(\d+(?:\.\d+)+[\w.]+)/i)
strategy :github_latest
end

Expand Down
7 changes: 3 additions & 4 deletions Casks/processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@

livecheck do
url :url
regex(%r{href=.*?tree/processing[._-](\d+)[._-]v?(\d+(?:\.\d+)+)}i)
strategy :github_latest do |page|
page.scan(regex)
.map { |match| "#{match[1]},#{match[0]}" }
regex(/^processing[._-](\d+(?:\.\d+)*)[@_-](\d+(?:\.\d+)+)$/i)
strategy :github_latest do |json, regex|
json["tag_name"]&.scan(regex)&.map { |match| "#{match[1]},#{match[0]}" }
end
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/ricochet-refresh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url "https://github.com/blueprint-freespeech/ricochet-refresh/releases"
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)[-"' >]}i)
regex(/v?(\d+(?:\.\d+)+)/i)
strategy :github_latest
end

Expand Down
10 changes: 5 additions & 5 deletions Casks/sequel-ace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

livecheck do
url :url
strategy :github_latest do |page|
match = page.match(%r{href=.*?/tag/production/v?(\d+(?:\.\d+)+)-(\d+)["' >]}i)
next if match.blank?

"#{match[1]},#{match[2]}"
regex(%r{^production/v?(\d+(?:\.\d+)+)(?:-(\d+))?}i)
strategy :github_latest do |json, regex|
json["tag_name"]&.scan(regex)&.map do |match|
match[1].present? ? "#{match[0]},#{match[1]}" : match[0]
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/time-to-leave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# on the GitHub releases page, so we have to use the `GithubLatest` strategy.
livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/\D*([^"' >]+?)["' >]}i)
regex(/^\D*?(\d+(?:\.\d+)+)$/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/turtl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# newer version may wrongly appear to be older).
livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/\D*([^"' >]+?)["' >]}i)
regex(/^\D*?(\d+(?:\.\d+)+.*)$/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/ubports-installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+(?:-beta)?)["' >]}i)
regex(/v?(\d+(?:\.\d+)+(?:-beta)?)/i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/utm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=.*?/tag/v?(\d+(?:[.-]\d+)+)["' >]}i)
regex(/v?(\d+(?:[.-]\d+)+)/i)
strategy :github_latest
end

Expand Down
1 change: 0 additions & 1 deletion Casks/vidcutter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

livecheck do
url :url
regex(%r{href=.*?/VidCutter[._-]v?(\d+(?:\.\d+)+)[._-]macOS\.dmg}i)
strategy :github_latest
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/vimediamanager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

livecheck do
url :url
regex(%r{href=.*?/v?(\d+(?:\.\d+)+[a-z]\d+)["' >]}i)
regex(/v?(\d+(?:\.\d+)+[a-z]\d+)/i)
strategy :github_latest
end

Expand Down
6 changes: 3 additions & 3 deletions Casks/vine-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/[^"' >]*?(\d+(?:[._-]\d+)+[a-z]?)["' >]}i)
strategy :github_latest do |page, regex|
page.scan(regex).map { |match| match[0].tr("_", ".") }
regex(/^v?(\d+(?:[._]\d+)+)$/i)
strategy :github_latest do |json, regex|
json["tag_name"]&.scan(regex)&.map { |match| match[0].tr("_", ".") }
end
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/waterfox-classic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

livecheck do
url :url
regex(%r{href=["']?[^"' >]*?/tag/v?(\d+(?:\.\d+)+)-classic["' >]}i)
regex(/v?(\d+(?:\.\d+)+)-classic/i)
strategy :github_latest
end

Expand Down
Loading