Skip to content

Commit

Permalink
fix: brew: do not really depends on release (#1252)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Nov 20, 2019
1 parent b0481a1 commit 8274bf1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
6 changes: 0 additions & 6 deletions internal/pipe/brew/brew.go
Expand Up @@ -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")
}
Expand Down
24 changes: 0 additions & 24 deletions internal/pipe/brew/brew_test.go
Expand Up @@ -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) {
Expand Down

0 comments on commit 8274bf1

Please sign in to comment.