refactor!: migrate to urfave/cli v1

Better flexible flags handling.
This commit is contained in:
2022-01-18 14:13:20 +01:00
parent c6db9ee355
commit 0e688f1407
48 changed files with 502 additions and 405 deletions

View File

@ -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)