refactor: construct recipe struct proper

This commit is contained in:
2021-09-06 01:41:16 +02:00
parent 6a1ecd0f85
commit 356c8f8c4e
6 changed files with 26 additions and 33 deletions

View File

@ -42,6 +42,10 @@ func (r Recipe) UpdateTag(image, tag string) error {
// Get retrieves a recipe.
func Get(recipeName string) (Recipe, error) {
if err := EnsureExists(recipeName); err != nil {
return Recipe{}, err
}
pattern := fmt.Sprintf("%s/%s/compose**yml", config.APPS_DIR, recipeName)
composeFiles, err := filepath.Glob(pattern)
if err != nil {