Skip to content

Commit

Permalink
caido: update livecheck
Browse files Browse the repository at this point in the history
The existing `livecheck` block for `caido` only contains a URL for
the GitHub repository, so it checks the repository's Git tags.
However, the cask `url` is a first-party asset from caido.download,
so the check doesn't closely align with the cask `url` source. [The
GitHub release descriptions contain links to the caido.download files
but this `livecheck` block simply checks the Git tags.]

The existing check technically works but we can update it to better
align with the cask `url` source. The first-party download page has
buttons to download the desktop app and this triggers an API request
that returns JSON information about the latest release. This updates
the `livecheck` block to check that URL and use the `version` field
from the JSON response.
  • Loading branch information
samford committed Dec 1, 2024
1 parent 86b61f1 commit 89a46f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Casks/c/caido.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
homepage "https://caido.io/"

livecheck do
url "https://github.com/caido/caido/"
url "https://api.caido.io/releases/latest"
strategy :json do |json|
json["version"]
end
end

depends_on macos: ">= :catalina"
Expand Down

0 comments on commit 89a46f1

Please sign in to comment.