forked from toolshed/abra
WIP: add first run at app rollback command
See coop-cloud/organising#146.
This commit is contained in:
@ -92,25 +92,6 @@ var appNewCommand = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
// getRecipeMeta retrieves the recipe metadata from the recipe catalogue.
|
||||
func getRecipeMeta(recipeName string) (catalogue.RecipeMeta, error) {
|
||||
catl, err := catalogue.ReadRecipeCatalogue()
|
||||
if err != nil {
|
||||
return catalogue.RecipeMeta{}, err
|
||||
}
|
||||
|
||||
recipeMeta, ok := catl[recipeName]
|
||||
if !ok {
|
||||
err := fmt.Errorf("recipe '%s' does not exist?", recipeName)
|
||||
return catalogue.RecipeMeta{}, err
|
||||
}
|
||||
if err := recipePkg.EnsureExists(recipeName); err != nil {
|
||||
return catalogue.RecipeMeta{}, err
|
||||
}
|
||||
|
||||
return recipeMeta, nil
|
||||
}
|
||||
|
||||
// ensureDomainFlag checks if the domain flag was used. if not, asks the user for it/
|
||||
func ensureDomainFlag() error {
|
||||
if domain == "" {
|
||||
@ -190,7 +171,7 @@ func action(c *cli.Context) error {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
recipeMeta, err := getRecipeMeta(recipe.Name)
|
||||
recipeMeta, err := catalogue.GetRecipeMeta(recipe.Name)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user