Merge pull request #10344 from vitorgalvao/no-github-appcast-audit
Cask: audit: Do not require appcast on GitHub releases
This commit is contained in:
commit
33dafa4498
@ -310,10 +310,6 @@ module Cask
|
||||
add_appcast = "please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/appcast.md"
|
||||
|
||||
case cask.url.to_s
|
||||
when %r{github.com/([^/]+)/([^/]+)/releases/download/(\S+)}
|
||||
return if cask.version.latest?
|
||||
|
||||
add_error "Download uses GitHub releases, #{add_appcast}"
|
||||
when %r{sourceforge.net/(\S+)}
|
||||
return if cask.version.latest?
|
||||
|
||||
|
||||
@ -597,18 +597,6 @@ describe Cask::Audit, :cask do
|
||||
it { is_expected.not_to fail_with(message) }
|
||||
end
|
||||
|
||||
context "when the download uses GitHub releases and has an appcast" do
|
||||
let(:cask_token) { "github-with-appcast" }
|
||||
|
||||
it { is_expected.not_to fail_with(message) }
|
||||
end
|
||||
|
||||
context "when the download uses GitHub releases and does not have an appcast" do
|
||||
let(:cask_token) { "github-without-appcast" }
|
||||
|
||||
it { is_expected.to fail_with(message) }
|
||||
end
|
||||
|
||||
context "when the download is hosted on SourceForge and has an appcast" do
|
||||
let(:cask_token) { "sourceforge-with-appcast" }
|
||||
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
cask "github-with-appcast" do
|
||||
version "1.0"
|
||||
sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
|
||||
|
||||
url "https://github.com/user/project/releases/download/#{version}/github.pkg"
|
||||
appcast "https://github.com/user/project/releases.atom"
|
||||
name "github"
|
||||
homepage "https://github.com/user/project"
|
||||
|
||||
pkg "github.pkg"
|
||||
|
||||
uninstall pkgutil: "com.github"
|
||||
end
|
||||
@ -1,12 +0,0 @@
|
||||
cask "github-without-appcast" do
|
||||
version "1.0"
|
||||
sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
|
||||
|
||||
url "https://github.com/user/project/releases/download/#{version}/github.pkg"
|
||||
name "github"
|
||||
homepage "https://github.com/user/project"
|
||||
|
||||
pkg "github.pkg"
|
||||
|
||||
uninstall pkgutil: "com.github"
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user