Skip empty sections in deploy overview

This commit is contained in:
3wc
2025-09-01 15:33:56 -04:00
parent 77c3fcea69
commit 6f9131f014

View File

@ -83,12 +83,24 @@ func DeployOverview(
{i18n.G("CURRENT DEPLOYMENT"), formatter.BoldDirtyDefault(deployedVersion)}, {i18n.G("CURRENT DEPLOYMENT"), formatter.BoldDirtyDefault(deployedVersion)},
{i18n.G("ENV VERSION"), formatter.BoldDirtyDefault(envVersion)}, {i18n.G("ENV VERSION"), formatter.BoldDirtyDefault(envVersion)},
{i18n.G("NEW DEPLOYMENT"), formatter.BoldDirtyDefault(toDeployVersion)}, {i18n.G("NEW DEPLOYMENT"), formatter.BoldDirtyDefault(toDeployVersion)},
{"", ""},
{i18n.G("IMAGES"), images},
}
if len(secrets) > 0 {
secretsRows := [][]string{
{"", ""}, {"", ""},
{i18n.G("SECRETS"), secrets}, {i18n.G("SECRETS"), secrets},
}
rows = append(rows, secretsRows...)
}
if len(configs) > 0 {
configsRows := [][]string{
{"", ""}, {"", ""},
{i18n.G("CONFIGS"), configs}, {i18n.G("CONFIGS"), configs},
{"", ""}, }
{i18n.G("IMAGES"), images}, rows = append(rows, configsRows...)
} }
deployType := getDeployType(deployedVersion, toDeployVersion) deployType := getDeployType(deployedVersion, toDeployVersion)