Clean up kompose help, remove support for unimplemented commands

This commit is contained in:
Janet Kuo
2016-08-03 15:50:37 -07:00
parent c618bc7c64
commit 8e5dda227f
3 changed files with 10 additions and 19 deletions
+2 -12
View File
@@ -27,7 +27,7 @@ import (
func ConvertCommand() cli.Command {
return cli.Command{
Name: "convert",
Usage: fmt.Sprintf("Convert %s to Kubernetes objects", app.DefaultComposeFile),
Usage: fmt.Sprintf("Convert Docker Compose file (e.g. %s) to Kubernetes objects", app.DefaultComposeFile),
Action: func(c *cli.Context) {
app.Convert(c)
},
@@ -165,15 +165,5 @@ func ScaleCommand() cli.Command {
// CommonFlags defines the flags that are in common for all subcommands.
func CommonFlags() []cli.Flag {
return []cli.Flag{
cli.BoolFlag{
Name: "verbose,debug",
},
cli.StringFlag{
Name: "file,f",
Usage: "Specify an alternate compose file (default: docker-compose.yml)",
Value: "docker-compose.yml",
EnvVar: "COMPOSE_FILE",
},
}
return []cli.Flag{}
}
+7 -6
View File
@@ -28,19 +28,20 @@ import (
func main() {
app := cli.NewApp()
app.Name = "kompose"
app.Usage = "Command line interface for Skippbox."
app.Usage = "A tool helping Docker Compose users move to Kubernetes."
app.Version = version.VERSION + " (" + version.GITCOMMIT + ")"
app.Author = "Skippbox Compose Contributors"
app.Author = "Skippbox Kompose Contributors"
app.Email = "https://github.com/skippbox/kompose"
app.EnableBashCompletion = true
app.Before = cliApp.BeforeApp
app.Flags = append(command.CommonFlags())
app.Commands = []cli.Command{
command.ConvertCommand(),
command.UpCommand(),
command.PsCommand(),
command.DeleteCommand(),
command.ScaleCommand(),
// TODO: enable these commands and update docs once we fix them
//command.UpCommand(),
//command.PsCommand(),
//command.DeleteCommand(),
//command.ScaleCommand(),
}
app.Run(os.Args)