forked from toolshed/abra
refactor: construct recipe struct proper
This commit is contained in:
@ -5,7 +5,6 @@ import (
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
"coopcloud.tech/abra/pkg/recipe"
|
||||
"github.com/docker/distribution/reference"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
@ -27,12 +26,7 @@ the versioning metadata of up-and-running containers are.
|
||||
`,
|
||||
ArgsUsage: "<recipe>",
|
||||
Action: func(c *cli.Context) error {
|
||||
recipeName := internal.ValidateRecipe(c)
|
||||
|
||||
recipe, err := recipe.Get(recipeName)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
recipe := internal.ValidateRecipe(c)
|
||||
|
||||
hasAppService := false
|
||||
for _, service := range recipe.Config.Services {
|
||||
@ -42,7 +36,7 @@ the versioning metadata of up-and-running containers are.
|
||||
}
|
||||
|
||||
if !hasAppService {
|
||||
logrus.Fatal(fmt.Sprintf("No 'app' service defined in '%s', cannot proceed", recipeName))
|
||||
logrus.Fatal(fmt.Sprintf("No 'app' service defined in '%s', cannot proceed", recipe.Name))
|
||||
}
|
||||
|
||||
for _, service := range recipe.Config.Services {
|
||||
|
Reference in New Issue
Block a user