// Revisions returns the revision history for the specified release. Code ported
// from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/history.go
Revisions returns the revision history for the specified release.
// Revisions returns the revision history for the specified release . Code ported // from : https : // github . com / helm / helm / blob / v3 . 4 . 2 / cmd / helm / history . go
func Revisions(params RevisionsParameters) ([]storage.Release, error) {
	settings := cli.New()
	actionConfig, err := helmInit(settings, params.Namespace)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	client := action.NewHistory(actionConfig)
	client.Max = maxHistory
	history, err := client.Run(params.Release)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	releaseutil.Reverse(history, releaseutil.SortByRevision)
	releases := make([]storage.Release, len(history))
	for i, rel := range history {
		release, err := storage.NewRelease(rel)
		if err != nil {
			return nil, trace.Wrap(err)
		}
		releases[i] = release
	}
	return releases, nil
}
func Revisions ( params RevisionsParameters ) ( [ ] storage . Release , error ) { settings := cli . New ( ) actionConfig , err := helmInit ( settings , params . Namespace ) if err != nil { return nil , trace . Wrap ( err ) } client := action . NewHistory ( actionConfig ) client . Max = maxHistory history , err := client . Run ( params . Release ) if err != nil { return nil , trace . Wrap ( err ) } releaseutil . Reverse ( history , releaseutil . SortByRevision ) releases := make ( [ ] storage . Release , len ( history ) ) for i , rel := range history { release , err := storage . NewRelease ( rel ) if err != nil { return nil , trace . Wrap ( err ) } releases [ i ] = release } return releases , nil }
Revisions returns the revision history for the specified release.
Revisions returns the revision history for the specified release .