diff --git a/cli/internal/deploy.go b/cli/internal/deploy.go index 3b1fa5b7..1f166b57 100644 --- a/cli/internal/deploy.go +++ b/cli/internal/deploy.go @@ -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") }