From 1403eac72ce184bc7b8c94f6d01de14fe88c9eaf Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Sat, 14 Jan 2023 20:09:09 -0800 Subject: [PATCH] fix: parse "Status" field during `catalogue generate` --- pkg/recipe/recipe.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/recipe/recipe.go b/pkg/recipe/recipe.go index 1042d0424..083842955 100644 --- a/pkg/recipe/recipe.go +++ b/pkg/recipe/recipe.go @@ -9,6 +9,7 @@ import ( "path" "path/filepath" "strings" + "strconv" "time" "coopcloud.tech/abra/pkg/client" @@ -464,6 +465,9 @@ func GetRecipeFeaturesAndCategory(recipeName string) (Features, string, error) { "\n") for _, val := range readmeLines { + if strings.Contains(val, "**Status**") { + feat.Status, _ = strconv.Atoi(strings.TrimSpace(strings.Split(strings.TrimPrefix(val, "* **Status**:"), ",")[0])) + } if strings.Contains(val, "**Category**") { category = strings.TrimSpace( strings.TrimPrefix(val, "* **Category**:"),