1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: brew: do not really depends on release (#1252)

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2019-11-20 09:45:53 -03:00 committed by GitHub
parent b0481a14e0
commit 8274bf1f03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 30 deletions

View File

@ -162,12 +162,6 @@ func doRun(ctx *context.Context, brew config.Homebrew, client client.Client) err
if ctx.SkipPublish {
return pipe.ErrSkipPublishEnabled
}
if ctx.Config.Release.Draft {
return pipe.Skip("release is marked as draft")
}
if ctx.Config.Release.Disable {
return pipe.Skip("release is disabled")
}
if strings.TrimSpace(brew.SkipUpload) == "auto" && ctx.Semver.Prerelease != "" {
return pipe.Skip("prerelease detected with 'auto' upload, skipping homebrew publish")
}

View File

@ -641,30 +641,6 @@ func TestRunPipeNoUpload(t *testing.T) {
ctx.SkipPublish = true
assertNoPublish(tt)
})
t.Run("draft release", func(tt *testing.T) {
ctx.Config.Release.Draft = true
ctx.Config.Brews[0].SkipUpload = "false"
ctx.SkipPublish = false
assertNoPublish(tt)
})
t.Run("release disabled", func(tt *testing.T) {
ctx.Config.Release.Disable = true
ctx.Config.Brews[0].SkipUpload = "false"
ctx.SkipPublish = false
assertNoPublish(tt)
})
t.Run("skip prerelease publish", func(tt *testing.T) {
ctx.Config.Release.Draft = false
ctx.Config.Brews[0].SkipUpload = "auto"
ctx.SkipPublish = false
ctx.Semver = context.Semver{
Major: 1,
Minor: 0,
Patch: 0,
Prerelease: "rc1",
}
assertNoPublish(tt)
})
}
func TestRunTokenTypeNotImplementedForBrew(t *testing.T) {