refactor!: migrate to urfave/cli v1
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Better flexible flags handling.
This commit is contained in:
@ -13,23 +13,25 @@ import (
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
var backupAllServices bool
|
||||
var backupAllServicesFlag = &cli.BoolFlag{
|
||||
Name: "all",
|
||||
Value: false,
|
||||
Name: "all, a",
|
||||
Destination: &backupAllServices,
|
||||
Aliases: []string{"a"},
|
||||
Usage: "Backup all services",
|
||||
}
|
||||
|
||||
var appBackupCommand = &cli.Command{
|
||||
Name: "backup",
|
||||
Usage: "Backup an app",
|
||||
Aliases: []string{"b"},
|
||||
Flags: []cli.Flag{backupAllServicesFlag},
|
||||
var appBackupCommand = cli.Command{
|
||||
Name: "backup",
|
||||
Aliases: []string{"b"},
|
||||
Usage: "Backup an app",
|
||||
Flags: []cli.Flag{
|
||||
internal.DebugFlag,
|
||||
internal.NoInputFlag,
|
||||
backupAllServicesFlag},
|
||||
Before: internal.SubCommandBefore,
|
||||
ArgsUsage: "<service>",
|
||||
Action: func(c *cli.Context) error {
|
||||
app := internal.ValidateApp(c)
|
||||
|
Reference in New Issue
Block a user