From 6f9131f0146e18e393a106a14a7b66814478b44b Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Mon, 1 Sep 2025 15:33:56 -0400 Subject: [PATCH] Skip empty sections in deploy overview --- cli/internal/deploy.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/cli/internal/deploy.go b/cli/internal/deploy.go index 33f75572..9fa556bb 100644 --- a/cli/internal/deploy.go +++ b/cli/internal/deploy.go @@ -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)