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 {
|
||||
return i18n.G("UNDEPLOY")
|
||||
}
|
||||
|
||||
if strings.Contains(newVersion, "+U") {
|
||||
return i18n.G("CHAOS DEPLOY")
|
||||
}
|
||||
|
||||
if strings.Contains(currentVersion, "+U") {
|
||||
return i18n.G("UNCHAOS DEPLOY")
|
||||
}
|
||||
|
||||
if currentVersion == newVersion {
|
||||
return ("REDEPLOY")
|
||||
}
|
||||
|
||||
if currentVersion == config.NO_VERSION_DEFAULT {
|
||||
return i18n.G("NEW DEPLOY")
|
||||
}
|
||||
|
||||
currentParsed, err := tagcmp.Parse(currentVersion)
|
||||
if err != nil {
|
||||
return i18n.G("DEPLOY")
|
||||
}
|
||||
|
||||
newParsed, err := tagcmp.Parse(newVersion)
|
||||
if err != nil {
|
||||
return i18n.G("DEPLOY")
|
||||
}
|
||||
|
||||
if currentParsed.IsLessThan(newParsed) {
|
||||
return i18n.G("UPGRADE")
|
||||
}
|
||||
|
||||
return i18n.G("DOWNGRADE")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user