refactor(recipe): load load compoes config where its used

This commit is contained in:
2024-07-08 12:31:39 +02:00
parent 99da8d4e57
commit c1b03bcbd7
16 changed files with 263 additions and 230 deletions

View File

@ -85,10 +85,14 @@ func SetBumpType(bumpType string) {
}
// GetMainAppImage retrieves the main 'app' image name
func GetMainAppImage(recipe recipe.Recipe) (string, error) {
func GetMainAppImage(recipe recipe.Recipe2) (string, error) {
var path string
for _, service := range recipe.Config.Services {
config, err := recipe.GetComposeConfig(nil)
if err != nil {
return "", err
}
for _, service := range config.Services {
if service.Name == "app" {
img, err := reference.ParseNormalizedNamed(service.Image)
if err != nil {