Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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