refactor(recipe): use method or variable for .env.sample

This commit is contained in:
2024-07-08 11:26:01 +02:00
parent 2f41b6d8b4
commit c861c09cce
11 changed files with 47 additions and 85 deletions

View File

@ -7,9 +7,9 @@ import (
"coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/autocomplete"
"coopcloud.tech/abra/pkg/formatter"
"coopcloud.tech/abra/pkg/log"
recipePkg "coopcloud.tech/abra/pkg/recipe"
"github.com/olekukonko/tablewriter"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
@ -42,16 +42,16 @@ var recipeVersionCommand = cli.Command{
catl, err := recipePkg.ReadRecipeCatalogue(internal.Offline)
if err != nil {
log.Fatal(err)
logrus.Fatal(err)
}
recipeMeta, ok := catl[recipe.Name]
if !ok {
log.Fatalf("%s is not published on the catalogue?", recipe.Name)
logrus.Fatalf("%s is not published on the catalogue?", recipe.Name)
}
if len(recipeMeta.Versions) == 0 {
log.Fatalf("%s has no catalogue published versions?", recipe.Name)
logrus.Fatalf("%s has no catalogue published versions?", recipe.Name)
}
tableCols := []string{"version", "service", "image", "tag"}