forked from toolshed/abra
feat: fetch all recipes when no recipe is specified (!401)
Closes coop-cloud/organising#530 Reviewed-on: coop-cloud/abra#401 Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech> Co-authored-by: p4u1 <p4u1_f4u1@riseup.net> Co-committed-by: p4u1 <p4u1_f4u1@riseup.net>
This commit is contained in:
@ -264,6 +264,20 @@ func (r Recipe) SampleEnv() (map[string]string, error) {
|
||||
return sampleEnv, nil
|
||||
}
|
||||
|
||||
// Ensure makes sure the recipe exists, is up to date and has the latest version checked out.
|
||||
func Ensure(recipeName string) error {
|
||||
if err := EnsureExists(recipeName); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := EnsureUpToDate(recipeName); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := EnsureLatest(recipeName); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// EnsureExists ensures that a recipe is locally cloned
|
||||
func EnsureExists(recipeName string) error {
|
||||
recipeDir := path.Join(config.RECIPES_DIR, recipeName)
|
||||
|
Reference in New Issue
Block a user