Skip empty sections in deploy overview
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
3wc
2025-09-01 15:33:56 -04:00
parent faa8cd12d9
commit 88ea705a33

View File

@ -84,13 +84,25 @@ func DeployOverview(
{i18n.G("ENV VERSION"), formatter.BoldDirtyDefault(envVersion)},
{i18n.G("NEW DEPLOYMENT"), formatter.BoldDirtyDefault(toDeployVersion)},
{"", ""},
{i18n.G("SECRETS"), secrets},
{"", ""},
{i18n.G("CONFIGS"), configs},
{"", ""},
{i18n.G("IMAGES"), images},
}
if len(secrets) > 0 {
secretsRows := [][]string{
{"", ""},
{i18n.G("SECRETS"), secrets},
}
rows = append(rows, secretsRows...)
}
if len(configs) > 0 {
configsRows := [][]string{
{"", ""},
{i18n.G("CONFIGS"), configs},
}
rows = append(rows, configsRows...)
}
deployType := getDeployType(deployedVersion, toDeployVersion)
overview := formatter.CreateOverview(i18n.G("%s OVERVIEW", deployType), rows)