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 72d4d4f3ea
commit 428ffdfb88
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,
"",
deployWarnMessages,
strings.Join(secretInfo, "\n"),
strings.Join(configInfo, "\n"),
strings.Join(imageInfo, "\n"),
secretInfo,
configInfo,
imageInfo,
); err != nil {
log.Fatal(err)
}

View File

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

View File

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

View File

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

View File

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