livecheck: check stable before head by default

This commit is contained in:
Sam Ford 2021-02-04 15:41:29 -05:00
parent 6df0a49fb5
commit 703d59b521
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE
2 changed files with 2 additions and 2 deletions

View File

@ -352,11 +352,11 @@ module Homebrew
case formula_or_cask
when Formula
urls << formula_or_cask.head.url if formula_or_cask.head
if formula_or_cask.stable
urls << formula_or_cask.stable.url
urls.concat(formula_or_cask.stable.mirrors)
end
urls << formula_or_cask.head.url if formula_or_cask.head
urls << formula_or_cask.homepage if formula_or_cask.homepage
when Cask::Cask
urls << formula_or_cask.appcast.to_s if formula_or_cask.appcast

View File

@ -133,7 +133,7 @@ describe Homebrew::Livecheck do
describe "::checkable_urls" do
it "returns the list of URLs to check" do
expect(livecheck.checkable_urls(f)).to eq([head_url, stable_url, homepage_url])
expect(livecheck.checkable_urls(f)).to eq([stable_url, head_url, homepage_url])
expect(livecheck.checkable_urls(c)).to eq([cask_url, homepage_url])
end
end