From d9f3a1126523f749309824aecf89b8a71a870f52 Mon Sep 17 00:00:00 2001 From: cellarspoon Date: Wed, 5 Jan 2022 18:04:46 +0100 Subject: [PATCH] fix: gracefully handle missing tag for syncing --- cli/recipe/release.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cli/recipe/release.go b/cli/recipe/release.go index 1a66afd0..20a47fbe 100644 --- a/cli/recipe/release.go +++ b/cli/recipe/release.go @@ -127,6 +127,7 @@ your SSH keys configured on your account. func getImageVersions(recipe recipe.Recipe) (map[string]string, error) { var services = make(map[string]string) + missingTag := false for _, service := range recipe.Config.Services { if service.Image == "" { continue @@ -146,12 +147,19 @@ func getImageVersions(recipe recipe.Recipe) (map[string]string, error) { case reference.NamedTagged: tag = img.(reference.NamedTagged).Tag() case reference.Named: - return services, fmt.Errorf("%s service is missing image tag?", path) + if service.Name == "app" { + missingTag = true + } + continue } services[path] = tag } + if missingTag { + return services, fmt.Errorf("app service is missing image tag?") + } + return services, nil }