New ๐ŸŒŠ wave for @helm

Commit b9d040d6

b9d040d6d0f8Merged

Dmitriy Zhilyaev <[email protected]> ยท 5 years ago ยท 4 files ยท ~4 modified

Description

Merge pull request #56 from zhilyaev/plan_subcommands

Add plan subcommands

Details

Commit
b9d040d6d0f8
Parent
b0e38a87e3b9
Merge parent
02ee109ee985

cmd/helmwave/commands.gomodifiedView file

@@ -10,29 +10,56 @@
1010 Name: "yml",
1111 Usage: "๐Ÿ“„ Render helmwave.yml.tpl -> helmwave.yml",
1212 Action: app.CliYml,
13+ Before: app.InitApp,
1314 },
14- {
15- Name: "planfile",
16- Aliases: []string{"plan"},
17- Usage: "๐Ÿ“œ Generate planfile to plandir",
18- Action: app.CliPlan,
19- },
15+ planCommand(),
2016 {
2117 Name: "deploy",
2218 Aliases: []string{"apply", "sync", "release"},
2319 Usage: "๐Ÿ›ฅ Deploy your helmwave!",
2420 Action: app.CliDeploy,
21+ Before: app.InitApp,
2522 },
2623 {
2724 Name: "manifest",
2825 Aliases: []string{"manifest"},
2926 Usage: "๐Ÿ›ฅ Fake Deploy",
3027 Action: app.CliManifests,
28+ Before: app.InitApp,
29+ },
30+ {
31+ Name: "version",
32+ Usage: "Print helmwave version",
33+ Action: app.CliVersion,
3134 },
3235 }
3336
3437 }
3538
39+func planCommand() *cli.Command {
40+ return &cli.Command{
41+ Name: "planfile",
42+ Aliases: []string{"plan"},
43+ Usage: "๐Ÿ“œ Generate planfile to plandir",
44+ Action: app.CliPlan,
45+ Before: app.InitApp,
46+ Subcommands: []*cli.Command{
47+ {
48+ Name: "repos",
49+ Action: app.CliPlan,
50+ },
51+ {
52+ Name: "releases",
53+ Action: app.CliPlan,
54+ },
55+ {
56+ Name: "values",
57+ Action: app.CliPlan,
58+ },
59+ },
60+ }
61+}
62+
3663 func help(c *cli.Context) error {
3764 args := c.Args()
3865 if args.Present() {