Skip to content
Permalink
Browse files

fix: defaults when release is disabled

closes #861
  • Loading branch information...
caarlos0 committed Nov 3, 2018
1 parent 498782e commit 67482044d2f9c079fcd892f7416059fd35ea1e84
Showing with 2 additions and 5 deletions.
  1. +0 −3 internal/pipe/release/release.go
  2. +2 −2 internal/pipe/release/release_test.go
@@ -20,9 +20,6 @@ func (Pipe) String() string {

// Default sets the pipe defaults
func (Pipe) Default(ctx *context.Context) error {
if ctx.Config.Release.Disable {
return nil
}
if ctx.Config.Release.NameTemplate == "" {
ctx.Config.Release.NameTemplate = "{{.Tag}}"
}
@@ -161,8 +161,8 @@ func TestDefaultPipeDisabled(t *testing.T) {
},
})
assert.NoError(t, Pipe{}.Default(ctx))
assert.Equal(t, "", ctx.Config.Release.GitHub.Name)
assert.Equal(t, "", ctx.Config.Release.GitHub.Owner)
assert.Equal(t, "goreleaser", ctx.Config.Release.GitHub.Name)
assert.Equal(t, "goreleaser", ctx.Config.Release.GitHub.Owner)
}

func TestDefaultFilled(t *testing.T) {

0 comments on commit 6748204

Please sign in to comment.
You can’t perform that action at this time.