mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
Merge pull request #159419 from bevanjkay/bump-celestia-1.6.3
celestia: use `github_releases` livecheck strategy
This commit is contained in:
+15
-1
@@ -7,9 +7,23 @@ cask "celestia" do
|
||||
desc "Space simulation for exploring the universe in three dimensions"
|
||||
homepage "https://github.com/CelestiaProject/Celestia/"
|
||||
|
||||
# Not every GitHub release provides a file for macOS, so we check multiple
|
||||
# recent releases instead of only the "latest" release.
|
||||
livecheck do
|
||||
url :url
|
||||
strategy :github_latest
|
||||
regex(/^celestia[._-]v?(\d+(?:\.\d+)+)[._-]?(macOS)?\.(?:dmg|pkg|zip)$/i)
|
||||
strategy :github_releases do |json, regex|
|
||||
json.map do |release|
|
||||
next if release["draft"] || release["prerelease"]
|
||||
|
||||
release["assets"]&.map do |asset|
|
||||
match = asset["name"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
match[1]
|
||||
end
|
||||
end.flatten
|
||||
end
|
||||
end
|
||||
|
||||
app "Celestia.app"
|
||||
|
||||
Reference in New Issue
Block a user