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:
@@ -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),
|
||||
|
@@ -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() {
|
||||
|
@@ -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"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user