Skip to content
Snippets Groups Projects
Commit 1ca68556 authored by Vítor Galvão's avatar Vítor Galvão
Browse files

Cask: audit: Do not require appcast on GitHub releases

parent 8869208a
No related branches found
No related tags found
No related merge requests found
......@@ -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" }
......
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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment