refactor: urfave v3
This commit is contained in:
@ -15,7 +15,7 @@ import (
|
||||
"coopcloud.tech/abra/pkg/lint"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"coopcloud.tech/abra/pkg/upstream/stack"
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/urfave/cli/v3"
|
||||
)
|
||||
|
||||
var appDeployCommand = cli.Command{
|
||||
@ -45,15 +45,17 @@ EXAMPLE:
|
||||
abra app deploy foo.example.com
|
||||
abra app deploy foo.example.com 1.2.3+3.2.1
|
||||
abra app deploy foo.example.com 1e83340e`,
|
||||
BashComplete: autocomplete.AppNameComplete,
|
||||
Action: func(c *cli.Context) error {
|
||||
app := internal.ValidateApp(c)
|
||||
EnableShellCompletion: true,
|
||||
ShellComplete: autocomplete.AppNameComplete,
|
||||
Action: func(ctx context.Context, cmd *cli.Command) error {
|
||||
app := internal.ValidateApp(cmd)
|
||||
stackName := app.StackName()
|
||||
|
||||
specificVersion := c.Args().Get(1)
|
||||
specificVersion := cmd.Args().Get(1)
|
||||
if specificVersion == "" {
|
||||
specificVersion = app.Recipe.Version
|
||||
}
|
||||
|
||||
if specificVersion != "" && internal.Chaos {
|
||||
log.Fatal("cannot use <version> and --chaos together")
|
||||
}
|
||||
|
Reference in New Issue
Block a user