implement storing to dir/file, add tests

When kompose convert -o artifacts is run, then if artifacts is a directory,
kompose stores all the resulting files inside it, and if it's not a directory,
it stores the artifacts in a single file.

Fixes #209
This commit is contained in:
Shubham Minglani
2016-12-21 18:12:43 +05:30
parent c485a870d8
commit 365fe81987
6 changed files with 136 additions and 14 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ func commonConvertFlags() []cli.Flag {
return []cli.Flag{
cli.StringFlag{
Name: "out,o",
Usage: "Specify file name in order to save objects into",
Usage: "Specify path to a file or a directory to save generated objects into. If path is a directory, the objects are stored in that directory. If path is a file, then objects are stored in that single file. File is created if it does not exist.",
EnvVar: "OUTPUT_FILE",
},
cli.IntFlag{