mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-08 03:31:59 +02:00
test: added a case for #720
This commit is contained in:
parent
a90d9462ff
commit
d43c74f0bf
@ -107,6 +107,15 @@ func TestRunPipe(t *testing.T) {
|
||||
"custom_download_strategy": func(ctx *context.Context) {
|
||||
ctx.Config.Brew.DownloadStrategy = "GitHubPrivateRepositoryReleaseDownloadStrategy"
|
||||
},
|
||||
"binary_overriden": func(ctx *context.Context) {
|
||||
ctx.Config.Archive.Format = "binary"
|
||||
ctx.Config.Archive.FormatOverrides = []config.FormatOverride{
|
||||
{
|
||||
Goos: "darwin",
|
||||
Format: "zip",
|
||||
},
|
||||
}
|
||||
},
|
||||
} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
folder, err := ioutil.TempDir("", "goreleasertest")
|
||||
|
34
pipeline/brew/testdata/binary_overriden.rb.golden
vendored
Normal file
34
pipeline/brew/testdata/binary_overriden.rb.golden
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
class BinaryOverriden < Formula
|
||||
desc "A run pipe test formula"
|
||||
homepage "https://github.com/goreleaser"
|
||||
url "https://github.com/test/test/releases/download/v1.0.1/bin.tar.gz"
|
||||
version "1.0.1"
|
||||
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
|
||||
depends_on "zsh"
|
||||
depends_on "bash"
|
||||
|
||||
conflicts_with "gtk+"
|
||||
conflicts_with "qt"
|
||||
|
||||
def install
|
||||
bin.install "foo"
|
||||
end
|
||||
|
||||
def caveats; <<~EOS
|
||||
don't do this
|
||||
EOS
|
||||
end
|
||||
|
||||
plist_options :startup => false
|
||||
|
||||
def plist; <<~EOS
|
||||
<xml>whatever</xml>
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
system "true"
|
||||
system "#{bin}/foo -h"
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user