forked from toolshed/abra
refactor: create compose package
This commit is contained in:
@ -14,7 +14,7 @@ var recipeVersionCommand = &cli.Command{
|
||||
Aliases: []string{"v"},
|
||||
ArgsUsage: "<recipe>",
|
||||
Action: func(c *cli.Context) error {
|
||||
recipe := internal.ValidateRecipe(c)
|
||||
recipeName := internal.ValidateRecipe(c)
|
||||
|
||||
catalogue, err := catalogue.ReadRecipeCatalogue()
|
||||
if err != nil {
|
||||
@ -22,17 +22,17 @@ var recipeVersionCommand = &cli.Command{
|
||||
return nil
|
||||
}
|
||||
|
||||
rec, ok := catalogue[recipe]
|
||||
recipe, ok := catalogue[recipeName]
|
||||
if !ok {
|
||||
logrus.Fatalf("'%s' recipe doesn't exist?", recipe)
|
||||
logrus.Fatalf("'%s' recipe doesn't exist?", recipeName)
|
||||
}
|
||||
|
||||
tableCol := []string{"Version", "Service", "Image", "Digest"}
|
||||
table := formatter.CreateTable(tableCol)
|
||||
|
||||
for version := range rec.Versions {
|
||||
for service := range rec.Versions[version] {
|
||||
meta := rec.Versions[version][service]
|
||||
for version := range recipe.Versions {
|
||||
for service := range recipe.Versions[version] {
|
||||
meta := recipe.Versions[version][service]
|
||||
table.Append([]string{version, service, meta.Image, meta.Digest})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user