refactor: less quotes
This commit is contained in:
parent
398deec272
commit
053a06ccba
|
@ -122,7 +122,7 @@ You may invoke this command in "wizard" mode and be prompted for input:
|
|||
}
|
||||
semverLikeTag := true
|
||||
if !tagcmp.IsParsable(img.(reference.NamedTagged).Tag()) {
|
||||
logrus.Debugf("'%s' not considered semver-like", img.(reference.NamedTagged).Tag())
|
||||
logrus.Debugf("%s not considered semver-like", img.(reference.NamedTagged).Tag())
|
||||
semverLikeTag = false
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ You may invoke this command in "wizard" mode and be prompted for input:
|
|||
if err != nil && semverLikeTag {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
logrus.Debugf("parsed '%s' for '%s'", tag, service.Name)
|
||||
logrus.Debugf("parsed %s for %s", tag, service.Name)
|
||||
var compatible []tagcmp.Tag
|
||||
for _, regVersion := range regVersions {
|
||||
other, err := tagcmp.Parse(regVersion.Name)
|
||||
|
@ -143,12 +143,12 @@ You may invoke this command in "wizard" mode and be prompted for input:
|
|||
}
|
||||
}
|
||||
|
||||
logrus.Debugf("detected potential upgradable tags '%s' for '%s'", compatible, service.Name)
|
||||
logrus.Debugf("detected potential upgradable tags %s for %s", compatible, service.Name)
|
||||
|
||||
sort.Sort(tagcmp.ByTagDesc(compatible))
|
||||
|
||||
if len(compatible) == 0 && semverLikeTag {
|
||||
logrus.Info(fmt.Sprintf("no new versions available for '%s', '%s' is the latest", image, tag))
|
||||
logrus.Info(fmt.Sprintf("no new versions available for %s, %s' is the latest", image, tag))
|
||||
continue // skip on to the next tag and don't update any compose files
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ You may invoke this command in "wizard" mode and be prompted for input:
|
|||
}
|
||||
}
|
||||
|
||||
logrus.Debugf("detected compatible upgradable tags '%s' for '%s'", compatibleStrings, service.Name)
|
||||
logrus.Debugf("detected compatible upgradable tags %s for %s", compatibleStrings, service.Name)
|
||||
|
||||
var upgradeTag string
|
||||
_, ok := servicePins[service.Name]
|
||||
|
@ -205,14 +205,14 @@ You may invoke this command in "wizard" mode and be prompted for input:
|
|||
}
|
||||
}
|
||||
if upgradeTag == "" {
|
||||
logrus.Warnf("not upgrading from '%s' to '%s' for '%s', because the upgrade type is more serious than what user wants.", tag.String(), compatible[0].String(), image)
|
||||
logrus.Warnf("not upgrading from %s to %s for %s, because the upgrade type is more serious than what user wants.", tag.String(), compatible[0].String(), image)
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
msg := fmt.Sprintf("upgrade to which tag? (service: %s, tag: %s)", service.Name, tag)
|
||||
if !tagcmp.IsParsable(img.(reference.NamedTagged).Tag()) {
|
||||
tag := img.(reference.NamedTagged).Tag()
|
||||
logrus.Warning(fmt.Sprintf("unable to determine versioning semantics of '%s', listing all tags", tag))
|
||||
logrus.Warning(fmt.Sprintf("unable to determine versioning semantics of %s, listing all tags", tag))
|
||||
msg = fmt.Sprintf("upgrade to which tag? (service: %s, tag: %s)", service.Name, tag)
|
||||
compatibleStrings = []string{}
|
||||
for _, regVersion := range regVersions {
|
||||
|
@ -232,7 +232,7 @@ You may invoke this command in "wizard" mode and be prompted for input:
|
|||
if err := recipe.UpdateTag(image, upgradeTag); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
logrus.Infof("tag upgraded from '%s' to '%s' for '%s'", tag.String(), upgradeTag, image)
|
||||
logrus.Infof("tag upgraded from %s to %s for %s", tag.String(), upgradeTag, image)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue