Merge pull request #10525 from samford/livecheck-check-stable-before-head

livecheck: check stable before head by default
This commit is contained in:
Sam Ford 2021-02-05 19:30:10 -05:00 committed by GitHub
commit 0d1aa33f81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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