fix: further fixes for gracefully handling missing tag

Follows 1b37d2d5f5.
This commit is contained in:
2022-01-05 17:57:48 +01:00
parent d7e1b2947a
commit d7cf11b876
3 changed files with 28 additions and 21 deletions

View File

@ -163,15 +163,17 @@ func (r Recipe) UpdateLabel(pattern, serviceName, label string) error {
}
// UpdateTag updates a recipe tag
func (r Recipe) UpdateTag(image, tag string) error {
func (r Recipe) UpdateTag(image, tag string) (bool, error) {
pattern := fmt.Sprintf("%s/%s/compose**yml", config.RECIPES_DIR, r.Name)
image = StripTagMeta(image)
if err := compose.UpdateTag(pattern, image, tag, r.Name); err != nil {
return err
ok, err := compose.UpdateTag(pattern, image, tag, r.Name)
if err != nil {
return false, err
}
return nil
return ok, nil
}
// Tags list the recipe tags