Fix release notes on helm (#10434)
This commit is contained in:
parent
82e24cb399
commit
8ab35777f6
1 changed files with 3 additions and 2 deletions
|
@ -20,6 +20,7 @@ import (
|
|||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
semver "github.com/blang/semver/v4"
|
||||
"github.com/helm/helm/pkg/chartutil"
|
||||
|
@ -107,10 +108,10 @@ func updateChartReleaseNotes(releasesNotes []string) {
|
|||
utils.Info("HELM Updating the Chart Release notes")
|
||||
chart, err := chartutil.LoadChartfile(HelmChartPath)
|
||||
utils.CheckIfError(err, "HELM Could not Load Chart to update release notes %s", HelmChartPath)
|
||||
var releaseNoteString string
|
||||
for i := range releasesNotes {
|
||||
releaseNoteString = fmt.Sprintf("%s - \"%s\"\n", releaseNoteString, releasesNotes[i])
|
||||
releasesNotes[i] = fmt.Sprintf("- %q", releasesNotes[i])
|
||||
}
|
||||
releaseNoteString := strings.Join(releasesNotes, "\n")
|
||||
utils.Info("HELM Release note string %s", releaseNoteString)
|
||||
chart.Annotations["artifacthub.io/changes"] = releaseNoteString
|
||||
err = chartutil.SaveChartfile(HelmChartPath, chart)
|
||||
|
|
Loading…
Reference in a new issue