Support printing to stdout

This commit is contained in:
Janet Kuo
2016-07-01 15:21:47 -07:00
parent 53802333fe
commit 6ae79d0e70
2 changed files with 45 additions and 47 deletions
+6 -1
View File
@@ -17,9 +17,9 @@ limitations under the License.
package command
import (
"github.com/urfave/cli"
"github.com/docker/libcompose/project"
"github.com/skippbox/kompose2/cli/app"
"github.com/urfave/cli"
)
// ConvertCommand defines the kompose convert subcommand.
@@ -35,6 +35,7 @@ func ConvertCommand(factory app.ProjectFactory) cli.Command {
Value: "docker-compose.yml",
EnvVar: "COMPOSE_FILE",
},
// TODO: validate the flags and make sure only one type is specified
cli.BoolFlag{
Name: "deployment,d",
Usage: "Generate a deployment resource file",
@@ -55,6 +56,10 @@ func ConvertCommand(factory app.ProjectFactory) cli.Command {
Name: "yaml, y",
Usage: "Generate resource file in yaml format",
},
cli.BoolFlag{
Name: "stdout,out",
Usage: "Print Kubernetes objects to stdout",
},
},
}
}