Show chart version on upgrade

Before:
Release "foobar" has been upgraded. Happy Helming!
NAME: foobar
LAST DEPLOYED: Mon Feb 26 17:18:58 2024
NAMESPACE: foobar
STATUS: deployed
REVISION: 49
TEST SUITE: None
...

After:
Release "foobar" has been upgraded. Happy Helming!
NAME: foobar
LAST DEPLOYED: Mon Feb 26 17:27:34 2024
NAMESPACE: foobar
STATUS: deployed
REVISION: 51
CHART: foobar
VERSION: 1.0.69
APP_VERSION: v1.0.69
TEST SUITE: None
...

Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
pull/12822/head
Jellyfrog 2 years ago
parent c5698e5e51
commit 168181e878

@ -4,6 +4,9 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 3
CHART: chart-with-subchart-update
VERSION: 0.0.1
APP_VERSION:
TEST SUITE: None
NOTES:
PARENT NOTES

@ -4,4 +4,7 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 2
CHART: testUpgradeChart
VERSION: 0.1.3
APP_VERSION:
TEST SUITE: None

@ -4,4 +4,7 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 2
CHART: testUpgradeChart
VERSION: 0.1.3
APP_VERSION:
TEST SUITE: None

@ -4,4 +4,7 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 5
CHART: testUpgradeChart
VERSION: 0.1.3
APP_VERSION:
TEST SUITE: None

@ -4,4 +4,7 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 6
CHART: testUpgradeChart
VERSION: 0.1.3
APP_VERSION:
TEST SUITE: None

@ -4,4 +4,7 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 4
CHART: testUpgradeChart
VERSION: 0.1.3
APP_VERSION:
TEST SUITE: None

@ -4,4 +4,7 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 3
CHART: testUpgradeChart
VERSION: 0.1.3
APP_VERSION:
TEST SUITE: None

@ -4,4 +4,7 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 3
CHART: testUpgradeChart
VERSION: 0.1.3
APP_VERSION:
TEST SUITE: None

@ -4,4 +4,7 @@ LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 3
CHART: testUpgradeChart
VERSION: 0.1.3
APP_VERSION:
TEST SUITE: None

@ -147,7 +147,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
if err != nil {
return err
}
return outfmt.Write(out, &statusPrinter{rel, settings.Debug, false, false, false})
return outfmt.Write(out, &statusPrinter{rel, settings.Debug, false, false, true})
} else if err != nil {
return err
}
@ -233,7 +233,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
fmt.Fprintf(out, "Release %q has been upgraded. Happy Helming!\n", args[0])
}
return outfmt.Write(out, &statusPrinter{rel, settings.Debug, false, false, false})
return outfmt.Write(out, &statusPrinter{rel, settings.Debug, false, false, true})
},
}

@ -92,5 +92,7 @@ func update(filename string, in []byte) error {
}
func normalize(in []byte) []byte {
return bytes.Replace(in, []byte("\r\n"), []byte("\n"), -1)
in = bytes.Replace(in, []byte("\r\n"), []byte("\n"), -1)
// Trim trailing space
return bytes.Replace(in, []byte(" \n"), []byte("\n"), -1)
}

Loading…
Cancel
Save