forked from LaconicNetwork/kompose
Make --dab global flag
This commit is contained in:
parent
fa46376dff
commit
3ce0519a82
@ -107,7 +107,7 @@ func validateFlags(opt kobject.ConvertOptions, singleOutput bool, dabFile, input
|
||||
// Convert transforms docker compose or dab file to k8s objects
|
||||
func Convert(c *cli.Context) {
|
||||
inputFile := c.GlobalString("file")
|
||||
dabFile := c.String("bundle")
|
||||
dabFile := c.GlobalString("bundle")
|
||||
outFile := c.String("out")
|
||||
generateYaml := c.BoolT("yaml")
|
||||
toStdout := c.BoolT("stdout")
|
||||
@ -189,7 +189,7 @@ func Up(c *cli.Context) {
|
||||
client := client.NewOrDie(clientConfig)
|
||||
|
||||
inputFile := c.GlobalString("file")
|
||||
dabFile := c.String("bundle")
|
||||
dabFile := c.GlobalString("bundle")
|
||||
|
||||
komposeObject := kobject.KomposeObject{
|
||||
ServiceConfigs: make(map[string]kobject.ServiceConfig),
|
||||
@ -239,7 +239,7 @@ func Down(c *cli.Context) {
|
||||
client := client.NewOrDie(clientConfig)
|
||||
|
||||
inputFile := c.GlobalString("file")
|
||||
dabFile := c.String("bundle")
|
||||
dabFile := c.GlobalString("bundle")
|
||||
|
||||
komposeObject := kobject.KomposeObject{
|
||||
ServiceConfigs: make(map[string]kobject.ServiceConfig),
|
||||
|
||||
@ -32,11 +32,6 @@ func ConvertCommand() cli.Command {
|
||||
app.Convert(c)
|
||||
},
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "bundle,dab",
|
||||
Usage: "Specify a Distributed Application Bundle (DAB) file",
|
||||
EnvVar: "DAB_FILE",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "out,o",
|
||||
Usage: "Specify file name in order to save objects into",
|
||||
@ -87,13 +82,6 @@ func UpCommand() cli.Command {
|
||||
Action: func(c *cli.Context) {
|
||||
app.Up(c)
|
||||
},
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "bundle,dab",
|
||||
Usage: "Specify a Distributed Application Bundle (DAB) file",
|
||||
EnvVar: "DAB_FILE",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,19 +93,18 @@ func DownCommand() cli.Command {
|
||||
Action: func(c *cli.Context) {
|
||||
app.Down(c)
|
||||
},
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "bundle,dab",
|
||||
Usage: "Specify a Distributed Application Bundle (DAB) file",
|
||||
EnvVar: "DAB_FILE",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// CommonFlags defines the flags that are in common for all subcommands.
|
||||
func CommonFlags() []cli.Flag {
|
||||
return []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "bundle,dab",
|
||||
Usage: "Specify a Distributed Application Bundle (DAB) file",
|
||||
EnvVar: "DAB_FILE",
|
||||
},
|
||||
|
||||
cli.StringFlag{
|
||||
Name: "file,f",
|
||||
Usage: fmt.Sprintf("Specify an alternative compose file (default: %s)", app.DefaultComposeFile),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user