chore: spacing for readability
This commit is contained in:
@ -143,29 +143,37 @@ func getDeployType(currentVersion, newVersion string) string {
|
|||||||
if newVersion == config.NO_DOMAIN_DEFAULT {
|
if newVersion == config.NO_DOMAIN_DEFAULT {
|
||||||
return i18n.G("UNDEPLOY")
|
return i18n.G("UNDEPLOY")
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(newVersion, "+U") {
|
if strings.Contains(newVersion, "+U") {
|
||||||
return i18n.G("CHAOS DEPLOY")
|
return i18n.G("CHAOS DEPLOY")
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(currentVersion, "+U") {
|
if strings.Contains(currentVersion, "+U") {
|
||||||
return i18n.G("UNCHAOS DEPLOY")
|
return i18n.G("UNCHAOS DEPLOY")
|
||||||
}
|
}
|
||||||
|
|
||||||
if currentVersion == newVersion {
|
if currentVersion == newVersion {
|
||||||
return ("REDEPLOY")
|
return ("REDEPLOY")
|
||||||
}
|
}
|
||||||
|
|
||||||
if currentVersion == config.NO_VERSION_DEFAULT {
|
if currentVersion == config.NO_VERSION_DEFAULT {
|
||||||
return i18n.G("NEW DEPLOY")
|
return i18n.G("NEW DEPLOY")
|
||||||
}
|
}
|
||||||
|
|
||||||
currentParsed, err := tagcmp.Parse(currentVersion)
|
currentParsed, err := tagcmp.Parse(currentVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return i18n.G("DEPLOY")
|
return i18n.G("DEPLOY")
|
||||||
}
|
}
|
||||||
|
|
||||||
newParsed, err := tagcmp.Parse(newVersion)
|
newParsed, err := tagcmp.Parse(newVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return i18n.G("DEPLOY")
|
return i18n.G("DEPLOY")
|
||||||
}
|
}
|
||||||
|
|
||||||
if currentParsed.IsLessThan(newParsed) {
|
if currentParsed.IsLessThan(newParsed) {
|
||||||
return i18n.G("UPGRADE")
|
return i18n.G("UPGRADE")
|
||||||
}
|
}
|
||||||
|
|
||||||
return i18n.G("DOWNGRADE")
|
return i18n.G("DOWNGRADE")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user