Merge pull request #156597 from samford/maria-discontinued

maria: discontinued
This commit is contained in:
Miccal Matthews
2023-09-30 13:19:25 +08:00
committed by GitHub
+4 -18
View File
@@ -7,23 +7,9 @@ cask "maria" do
desc "App/widget for aria2 download tool"
homepage "https://github.com/shincurry/Maria"
livecheck do
url "https://github.com/shincurry/Maria/releases/latest"
regex(%r{href=.*?/Maria_v?(\d+(?:\.\d+)*)_build(.*?)\.dmg}i)
strategy :header_match do |headers, regex|
next if headers["location"].blank?
# Identify the latest tag from the response's `location` header
latest_tag = File.basename(headers["location"])
next if latest_tag.blank?
# Fetch the assets list HTML for the latest tag and match within it
assets_page = Homebrew::Livecheck::Strategy.page_content(
@url.sub(%r{/releases/?.+}, "/releases/expanded_assets/#{latest_tag}"),
)
assets_page[:content]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
end
end
app "Maria.app"
caveats do
discontinued
end
end