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

insomnia*: update livecheck #197096

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions Casks/i/insomnia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
homepage "https://insomnia.rest/"

livecheck do
url :url
regex(/^core@v?(\d+(?:\.\d+)+)$/i)
strategy :github_latest
url "https://updates.insomnia.rest/builds/check/mac?v=#{version.major}.0.0&app=com.insomnia.app&channel=stable"
strategy :json do |json|
json["name"]
end
end

auto_updates true
Expand Down
14 changes: 3 additions & 11 deletions Casks/i/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,9 @@
homepage "https://insomnia.rest/"

livecheck do
url :url
regex(/^core@v?(\d+(?:\.\d+)+(?:[._-](?:alpha|beta|rc)[._-]?\d*)?)$/i)
strategy :github_releases do |json, regex|
json.map do |release|
next if release["draft"]

match = release["tag_name"]&.match(regex)
next if match.blank?

match[1]
end
url "https://updates.insomnia.rest/builds/check/mac?v=#{version.major}.0.0&app=com.insomnia.app&channel=beta"
strategy :json do |json|
json["name"]
end
end

Expand Down
Loading