mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-18 20:46:30 +02:00
Improve r13y of packwiz modrinth export
by sorting manifestFiles
(#287)
resolves #244
This commit is contained in:
parent
5bb680f266
commit
9cca74476d
@ -9,6 +9,7 @@ import (
|
||||
"golang.org/x/exp/slices"
|
||||
"net/url"
|
||||
"os"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
||||
"github.com/packwiz/packwiz/core"
|
||||
@ -172,6 +173,10 @@ var exportCmd = &cobra.Command{
|
||||
}
|
||||
}
|
||||
}
|
||||
// sort by `path` property before serialising to ensure reproducibility
|
||||
sort.Slice(manifestFiles, func(i, j int) bool {
|
||||
return manifestFiles[i].Path < manifestFiles[j].Path
|
||||
})
|
||||
|
||||
err = session.SaveIndex()
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user