0
0
forked from toolshed/abra

refactor(recipe): introduce new recipe struct and move some methods

This commit is contained in:
2024-07-07 12:35:09 +02:00
parent 9ef64778f5
commit 950f85e2b4
16 changed files with 197 additions and 167 deletions

View File

@ -35,6 +35,7 @@ var appPsCommand = cli.Command{
BashComplete: autocomplete.AppNameComplete,
Action: func(c *cli.Context) error {
app := internal.ValidateApp(c)
r := recipe.Get2(app.Recipe)
cl, err := client.New(app.Server)
if err != nil {
@ -53,7 +54,7 @@ var appPsCommand = cli.Command{
statuses, err := appPkg.GetAppStatuses([]appPkg.App{app}, true)
if statusMeta, ok := statuses[app.StackName()]; ok {
if _, exists := statusMeta["chaos"]; !exists {
if err := recipe.EnsureVersion(app.Recipe, deployedVersion); err != nil {
if err := r.EnsureVersion(deployedVersion); err != nil {
log.Fatal(err)
}
}