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
5 changes: 5 additions & 0 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ var initCmd = &cobra.Command{

if projectConfigErr != nil {
exit.Fatal(fmt.Sprintf(" Init failed while creating the zero project config file %s", projectConfigErr.Error()))
} else {
flog.Infof(`:tada: Done - Your project definition file has been initialized with your choices. Please review it, make any required changes and then create your project.
cd %s
cat zero-project.yml
zero create`, projectContext.Name)
}
},
}
10 changes: 7 additions & 3 deletions internal/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/commitdev/zero/pkg/util/exit"
"github.com/commitdev/zero/pkg/util/flog"
"github.com/manifoldco/promptui"
"gopkg.in/yaml.v2"
)

// Create cloud provider context
Expand Down Expand Up @@ -114,9 +115,12 @@ func getProjectPrompts(projectName string, modules map[string]moduleconfig.Modul
handlers := map[string]PromptHandler{
"ShouldPushRepositories": {
Parameter: moduleconfig.Parameter{
Field: "ShouldPushRepositories",
Label: "Should the created projects be checked into github automatically? (y/n)",
Default: "y",
Field: "ShouldPushRepositories",
Label: "Should the created projects be checked into github automatically?",
Options: yaml.MapSlice{
yaml.MapItem{Key: "y", Value: "yes"},
yaml.MapItem{Key: "n", Value: "no"},
},
},
Condition: NoCondition,
Validate: SpecificValueValidation("y", "n"),
Expand Down