vacuum: sort artifacts so they have consistent order

(and notably so erofs comes before erofs.caibx, preventing the latter
to match the match rule for the former)
This commit is contained in:
Harald Sitter
2025-08-16 16:36:01 +02:00
parent 7804192518
commit ecf324541d

View File

@@ -93,7 +93,9 @@ type release struct {
func readSHA256s(toKeep []string, releases map[string]release) []string {
sha256s := []string{}
for _, key := range toKeep {
for _, artifact := range releases[key].artifacts {
artifacts := releases[key].artifacts
sort.Strings(artifacts) // Sort artifacts to ensure consistent order
for _, artifact := range artifacts {
sha256 := readSHA256(artifact + ".sha256")
if sha256 == "" {
log.Println("Failed to read SHA256 for", artifact)