From 5d837576919b045d1aea04a0edb865f9a0846a55 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Sat, 28 Oct 2023 14:50:23 -0400 Subject: [PATCH] add stable sort to helm dependencies --- pkg/scaffold/helm.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/scaffold/helm.go b/pkg/scaffold/helm.go index f5306b84..eee0937d 100644 --- a/pkg/scaffold/helm.go +++ b/pkg/scaffold/helm.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "path/filepath" + "sort" "strings" ttpl "text/template" @@ -61,6 +62,9 @@ func (s *Scaffold) chartDependencies(w *wkspace.Workspace) []dependency { fmt.Sprintf("%s.enabled", chartInstallation.Chart.Name), } } + sort.SliceStable(dependencies, func(i, j int) bool { + return dependencies[i].Name < dependencies[j].Name + }) return dependencies }