1
0
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:
Carlos Alexandro Becker 2018-07-11 00:36:02 -07:00
parent a90d9462ff
commit d43c74f0bf
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 43 additions and 0 deletions

View File

@ -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")

View 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