Move strings.Join to DeployOverview
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
3wc
2025-09-08 22:05:41 -04:00
parent 02e352ae57
commit fa3e764fa6
5 changed files with 18 additions and 18 deletions

View File

@ -215,9 +215,9 @@ checkout as-is. Recipe commit hashes are also supported as values for
toDeployVersion, toDeployVersion,
"", "",
deployWarnMessages, deployWarnMessages,
strings.Join(secretInfo, "\n"), secretInfo,
strings.Join(configInfo, "\n"), configInfo,
strings.Join(imageInfo, "\n"), imageInfo,
); err != nil { ); err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@ -210,9 +210,9 @@ beforehand. See "abra app backup" for more.`),
chosenDowngrade, chosenDowngrade,
"", "",
downgradeWarnMessages, downgradeWarnMessages,
strings.Join(secretInfo, "\n"), secretInfo,
strings.Join(configInfo, "\n"), configInfo,
strings.Join(imageInfo, "\n"), imageInfo,
); err != nil { ); err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@ -71,9 +71,9 @@ Passing "--prune/-p" does not remove those volumes.`),
config.NO_DOMAIN_DEFAULT, config.NO_DOMAIN_DEFAULT,
"", "",
nil, nil,
"", nil,
"", nil,
"", nil,
); err != nil { ); err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@ -247,9 +247,9 @@ beforehand. See "abra app backup" for more.`),
chosenUpgrade, chosenUpgrade,
upgradeReleaseNotes, upgradeReleaseNotes,
upgradeWarnMessages, upgradeWarnMessages,
strings.Join(secretInfo, "\n"), secretInfo,
strings.Join(configInfo, "\n"), configInfo,
strings.Join(imageInfo, "\n"), imageInfo,
); err != nil { ); err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@ -50,9 +50,9 @@ func DeployOverview(
toDeployVersion string, toDeployVersion string,
releaseNotes string, releaseNotes string,
warnMessages []string, warnMessages []string,
secrets string, secrets []string,
configs string, configs []string,
images string, images []string,
) error { ) error {
deployConfig := "compose.yml" deployConfig := "compose.yml"
if composeFiles, ok := app.Env["COMPOSE_FILE"]; ok { if composeFiles, ok := app.Env["COMPOSE_FILE"]; ok {
@ -84,13 +84,13 @@ func DeployOverview(
{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}, {i18n.G("IMAGES"), strings.Join(images, "\n")},
} }
if len(secrets) > 0 { if len(secrets) > 0 {
secretsRows := [][]string{ secretsRows := [][]string{
{"", ""}, {"", ""},
{i18n.G("SECRETS"), secrets}, {i18n.G("SECRETS"), strings.Join(secrets, "\n")},
} }
rows = append(rows, secretsRows...) rows = append(rows, secretsRows...)
} }
@ -98,7 +98,7 @@ func DeployOverview(
if len(configs) > 0 { if len(configs) > 0 {
configsRows := [][]string{ configsRows := [][]string{
{"", ""}, {"", ""},
{i18n.G("CONFIGS"), configs}, {i18n.G("CONFIGS"), strings.Join(configs, "\n")},
} }
rows = append(rows, configsRows...) rows = append(rows, configsRows...)
} }