Skip to content

Commit

Permalink
Merge pull request #188396 from Homebrew/update-kekaexternalhelper
Browse files Browse the repository at this point in the history
kekaexternalhelper: add livecheck
  • Loading branch information
samford authored Oct 14, 2024
2 parents 0b46ade + d2c27ef commit 180df42
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Casks/k/kekaexternalhelper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@
# through the headers for all responses (not the hash of merged headers,
# where only the last `location` header is available).
livecheck do
skip "Cannot identify version without access to all headers"
url :url
regex(%r{/v?(\d+(?:\.\d+)+)/KekaExternalHelper[._-]v?(\d+(?:\.\d+)+)\.zip$}i)
strategy :github_latest do |json, regex|
json["assets"]&.map do |asset|
match = asset["browser_download_url"]&.match(regex)
next if match.blank?

"#{match[2]},#{match[1]}"
end
end
end

app "KekaExternalHelper.app"
Expand Down

0 comments on commit 180df42

Please sign in to comment.