diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-01-05 12:58:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 13:58:51 +0200 |
commit | f74293f9c27c65ad5c08971709128ce13299de05 (patch) | |
tree | 857bf40b2ed0a2f9c86e6d3a46548ac111f28f23 /build | |
parent | 906d8cc5dc41d41f0cd9230d99aa08acb7c8f6f5 (diff) | |
download | gitea-f74293f9c27c65ad5c08971709128ce13299de05.tar.gz gitea-f74293f9c27c65ad5c08971709128ce13299de05.zip |
Fix unstable emoji sort (#22346)
Without the second sort every generate run produces a different result.
Diffstat (limited to 'build')
-rw-r--r-- | build/generate-emoji.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build/generate-emoji.go b/build/generate-emoji.go index 0add230c58..60350336c1 100644 --- a/build/generate-emoji.go +++ b/build/generate-emoji.go @@ -189,6 +189,10 @@ func generate() ([]byte, error) { } } + sort.Slice(data, func(i, j int) bool { + return data[i].Aliases[0] < data[j].Aliases[0] + }) + // add header str := replacer.Replace(fmt.Sprintf(hdr, gemojiURL, data)) |