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:
parent
b0481a14e0
commit
8274bf1f03
@ -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")
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user