28 lines
469 B
Go
28 lines
469 B
Go
package app
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"coopcloud.tech/abra/pkg/config"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
var appRollbackCommand = &cli.Command{
|
|
Name: "rollback",
|
|
Usage: "Roll an app back to a previous version",
|
|
Aliases: []string{"b"},
|
|
ArgsUsage: "[<version>]",
|
|
BashComplete: func(c *cli.Context) {
|
|
appNames, err := config.GetAppNames()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if c.NArg() > 0 {
|
|
return
|
|
}
|
|
for _, a := range appNames {
|
|
fmt.Println(a)
|
|
}
|
|
},
|
|
}
|