Skip to content

Commit

Permalink
fix: do not skip scoop on draft releases (#3889)
Browse files Browse the repository at this point in the history
all other pipes don't, not sure why scoop was doing it.

closes #3887
  • Loading branch information
caarlos0 committed Mar 24, 2023
1 parent 44f8fae commit 723484d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
3 changes: 0 additions & 3 deletions internal/pipe/scoop/scoop.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ func doPublish(ctx *context.Context, cl client.Client) error {
if strings.TrimSpace(scoop.SkipUpload) == "auto" && ctx.Semver.Prerelease != "" {
return pipe.Skip("release is prerelease")
}
if ctx.Config.Release.Draft {
return pipe.Skip("release is marked as draft")
}

relDisabled, err := tmpl.New(ctx).Bool(ctx.Config.Release.Disable)
if err != nil {
Expand Down
34 changes: 0 additions & 34 deletions internal/pipe/scoop/scoop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,40 +299,6 @@ func Test_doRun(t *testing.T) {
shouldNotErr,
noAssertions,
},
{
"is draft",
args{
func() *context.Context {
return testctx.NewWithCfg(
config.Project{
ProjectName: "run-pipe",
Release: config.Release{
Draft: true,
},
Scoop: config.Scoop{
Bucket: config.RepoRef{
Owner: "test",
Name: "test",
},
Description: "A run pipe test formula",
Homepage: "https://github.com/goreleaser",
},
},
testctx.GitHubTokenType,
testctx.WithCurrentTag("v1.0.1"),
testctx.WithVersion("1.0.1"),
)
},
client.NewMock(),
},
[]artifact.Artifact{
{Name: "foo_1.0.1_windows_amd64.tar.gz", Goos: "windows", Goarch: "amd64", Goamd64: "v1", Path: file},
{Name: "foo_1.0.1_windows_386.tar.gz", Goos: "windows", Goarch: "386", Path: file},
},
shouldNotErr,
shouldErr("release is marked as draft"),
noAssertions,
},
{
"is prerelease and skip upload set to auto",
args{
Expand Down

0 comments on commit 723484d

Please sign in to comment.