big refactor
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
2024-06-24 23:20:54 +02:00
parent b688ddc4b1
commit cbab9b5907
27 changed files with 411 additions and 324 deletions

View File

@ -39,6 +39,11 @@ var appPsCommand = cli.Command{
Action: func(c *cli.Context) error {
app := internal.ValidateApp(c)
r, err := recipe.Get(app.Recipe)
if err != nil {
logrus.Fatal(err)
}
cl, err := client.New(app.Server)
if err != nil {
logrus.Fatal(err)
@ -56,7 +61,7 @@ var appPsCommand = cli.Command{
statuses, err := config.GetAppStatuses([]config.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 {
logrus.Fatal(err)
}
}