Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,45 @@ func (c buildConfig) Prompt() (buildConfig, error) {
Default: c.Path,
},
},
{
Name: "builder",
Prompt: &survey.Select{
Message: "Select builder:",
Options: []string{"pack", "s2i", "host"},
Default: c.Builder,
},
},
{
Name: "push",
Prompt: &survey.Confirm{
Message: "Push image to your registry after build?",
Default: c.Push,
},
},
}
//
// TODO(lkingland): add confirmation prompts for other config members here
//

err = survey.Ask(qs, &c)
return c, err
if err != nil {
return c, err
}

if c.Builder == "host" {
hostQs := []*survey.Question{
{
Name: "baseImage",
Prompt: &survey.Input{
Message: "Optional base image for your function (empty for default):",
Default: c.BaseImage,
},
},
}
err = survey.Ask(hostQs, &c)
if err != nil {
return c, err
}
}

return c, nil
}

// Validate the config passes an initial consistency check
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there a change to third party?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting. The check might fail asking to "update codegen" if this is a real problem (probably an IDE autocleanup or other)

Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
// connecting to the same hosts repeatedly from the same client, you can use
// DefaultPooledClient to receive a client that has connection pooling
// semantics similar to http.DefaultClient.
//
package cleanhttp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//go:build !windows
// +build !windows

// TODO(jen20): These need fixing on Windows but fmt is not used right now
// and red CI is making it harder to process other bugs, so ignore until
// we get around to fixing them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,9 @@ func (p *printer) heredocIndent(buf []byte) []byte {
//
// A single line object:
//
// * has no lead comments (hence multi-line)
// * has no assignment
// * has no values in the stanza (within {})
//
// - has no lead comments (hence multi-line)
// - has no assignment
// - has no values in the stanza (within {})
func (p *printer) isSingleLineObject(val *ast.ObjectItem) bool {
// If there is a lead comment, can't be one line
if val.LeadComment != nil {
Expand Down
Loading