source.drafts forces releases to be drafts

this makes all versions emitted and detected by the resource be
consistently drafts. a separate non-draft resource should be used for
publishing non-draft releases.
This commit is contained in:
Alex Suraci
2015-10-27 09:26:09 -07:00
parent 7331e0a7ad
commit e19842d3be
3 changed files with 2 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ func (c *OutCommand) Run(sourceDir string, request OutRequest) (OutResponse, err
}
}
draft := request.Params.Draft
draft := request.Source.Drafts
release := &github.RepositoryRelease{
Name: github.String(name),

View File

@@ -221,7 +221,7 @@ var _ = Describe("Out Command", func() {
BeforeEach(func() {
bodyPath := filepath.Join(sourcesDir, "body")
file(bodyPath, "this is a great release")
request.Params.Draft = true
request.Source.Drafts = true
})
It("creates a release on GitHub in draft mode", func() {

View File

@@ -41,7 +41,6 @@ type OutParams struct {
BodyPath string `json:"body"`
TagPath string `json:"tag"`
CommitishPath string `json:"commitish"`
Draft bool `json:"draft"`
Globs []string `json:"globs"`
}