diff --git a/cmd/build.go b/cmd/build.go index d80c212263..1aaf6ef69a 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -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 diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/go-cleanhttp/doc.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/go-cleanhttp/doc.go index 05841092a7..905859c7fe 100644 --- a/third_party/VENDOR-LICENSE/github.com/hashicorp/go-cleanhttp/doc.go +++ b/third_party/VENDOR-LICENSE/github.com/hashicorp/go-cleanhttp/doc.go @@ -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 diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd_test.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd_test.go index 66bed581c0..bd38218a31 100644 --- a/third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd_test.go +++ b/third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd_test.go @@ -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. diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/nodes.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/nodes.go index 7c038d12a2..f207bf92d7 100644 --- a/third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/nodes.go +++ b/third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/nodes.go @@ -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 {