refactor: single missing value

This commit is contained in:
2025-10-02 10:53:31 +02:00
parent d63a1c28ea
commit a3d0ece7cb
4 changed files with 10 additions and 13 deletions

View File

@ -197,7 +197,7 @@ checkout as-is. Recipe commit hashes are also supported as values for
log.Debug(i18n.G("skipping domain checks"))
}
deployedVersion := config.NO_VERSION_DEFAULT
deployedVersion := config.MISSING_DEFAULT
if deployMeta.IsDeployed {
deployedVersion = deployMeta.Version
if deployMeta.IsChaos {

View File

@ -73,7 +73,7 @@ Passing "--prune/-p" does not remove those volumes.`),
if err := internal.DeployOverview(
app,
version,
config.NO_DOMAIN_DEFAULT,
config.MISSING_DEFAULT,
"",
nil,
nil,

View File

@ -66,12 +66,12 @@ func DeployOverview(
domain := app.Domain
if domain == "" {
domain = config.NO_DOMAIN_DEFAULT
domain = config.MISSING_DEFAULT
}
envVersion := app.Recipe.EnvVersionRaw
if envVersion == "" {
envVersion = config.NO_VERSION_DEFAULT
envVersion = config.MISSING_DEFAULT
}
rows := [][]string{
@ -140,7 +140,7 @@ func DeployOverview(
}
func getDeployType(currentVersion, newVersion string) string {
if newVersion == config.NO_DOMAIN_DEFAULT {
if newVersion == config.MISSING_DEFAULT {
return i18n.G("UNDEPLOY")
}
@ -156,7 +156,7 @@ func getDeployType(currentVersion, newVersion string) string {
return ("REDEPLOY")
}
if currentVersion == config.NO_VERSION_DEFAULT {
if currentVersion == config.MISSING_DEFAULT {
return i18n.G("NEW DEPLOY")
}
@ -191,17 +191,17 @@ func MoveOverview(
domain := app.Domain
if domain == "" {
domain = config.NO_DOMAIN_DEFAULT
domain = config.MISSING_DEFAULT
}
secretsOverview := strings.Join(secrets, "\n")
if len(secrets) == 0 {
secretsOverview = config.NO_SECRETS_DEFAULT
secretsOverview = config.MISSING_DEFAULT
}
volumesOverview := strings.Join(volumes, "\n")
if len(volumes) == 0 {
volumesOverview = config.NO_VOLUMES_DEFAULT
volumesOverview = config.MISSING_DEFAULT
}
rows := [][]string{

View File

@ -116,10 +116,7 @@ var (
DIRTY_DEFAULT = "+U"
NO_DOMAIN_DEFAULT = "-"
NO_VERSION_DEFAULT = "-"
NO_SECRETS_DEFAULT = "-"
NO_VOLUMES_DEFAULT = "-"
MISSING_DEFAULT = "-"
UNKNOWN_DEFAULT = "unknown"
)