Skip to content

Commit 727ba99

Browse files
committed
feat: add interactive prompts for builder, push, and build options
1 parent 39c321d commit 727ba99

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

cmd/build.go

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,38 @@ func (c buildConfig) Prompt() (buildConfig, error) {
395395
Default: c.Path,
396396
},
397397
},
398+
{
399+
Name: "builder",
400+
Prompt: &survey.Select{
401+
Message: "Select builder:",
402+
Options: []string{"pack", "s2i", "host"},
403+
Default: c.Builder,
404+
},
405+
},
406+
{
407+
Name: "push",
408+
Prompt: &survey.Confirm{
409+
Message: "Push image after build?",
410+
Default: c.Push,
411+
},
412+
},
413+
{
414+
Name: "builderImage",
415+
Prompt: &survey.Input{
416+
Message: "Optional custom builder image:",
417+
Default: c.BuilderImage,
418+
},
419+
},
420+
{
421+
Name: "baseImage",
422+
Prompt: &survey.Input{
423+
Message: "Optional base image for your function (host builder only):",
424+
Default: c.BaseImage,
425+
},
426+
},
427+
398428
}
399-
//
400-
// TODO(lkingland): add confirmation prompts for other config members here
401-
//
429+
402430
err = survey.Ask(qs, &c)
403431
return c, err
404432
}

0 commit comments

Comments
 (0)