From 7ecdf552ef4b7ee898347be3fd0b372b794c85e0 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 2 Mar 2021 08:13:18 -0500 Subject: [PATCH] Actually ignore NOTES.txt --- main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 51c65cf..71ed40f 100644 --- a/main.go +++ b/main.go @@ -261,16 +261,18 @@ func renderResources(c *action.Configuration, ch *chart.Chart, values chartutil. // Sort hooks, manifests, and partials. Only hooks and manifests are returned, // as partials are not used after renderer.Render. Empty manifests are also // removed here. + for k, _ := range files { + if strings.HasSuffix(k, "NOTES.txt") { + delete(files, k) + } + } _, manifests, err := releaseutil.SortManifests(files, c.Capabilities.APIVersions, releaseutil.InstallOrder) if err != nil { return b, err } for _, m := range manifests { - // skip notes - if !strings.Contains(m.Name, "NOTES.txt") { - fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, m.Content) - } + fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, m.Content) } return b, nil