refactor: move app files from config to app package

This commit is contained in:
2024-07-05 16:04:01 +02:00
parent ac695ae28e
commit f18c642226
31 changed files with 915 additions and 912 deletions

View File

@ -12,6 +12,7 @@ import (
"strconv"
"strings"
"coopcloud.tech/abra/pkg/app"
"coopcloud.tech/abra/pkg/catalogue"
"coopcloud.tech/abra/pkg/compose"
"coopcloud.tech/abra/pkg/config"
@ -227,7 +228,7 @@ func Get(recipeName string, offline bool) (Recipe, error) {
}
envSamplePath := path.Join(config.RECIPES_DIR, recipeName, ".env.sample")
sampleEnv, err := config.ReadEnv(envSamplePath)
sampleEnv, err := app.ReadEnv(envSamplePath)
if err != nil {
return Recipe{}, err
}
@ -257,7 +258,7 @@ func Get(recipeName string, offline bool) (Recipe, error) {
func (r Recipe) SampleEnv() (map[string]string, error) {
envSamplePath := path.Join(config.RECIPES_DIR, r.Name, ".env.sample")
sampleEnv, err := config.ReadEnv(envSamplePath)
sampleEnv, err := app.ReadEnv(envSamplePath)
if err != nil {
return sampleEnv, fmt.Errorf("unable to discover .env.sample for %s", r.Name)
}