Merge pull request #13363 from jan--f/embed.go-sorted-file-list

scripts: sort file list in embed directive
This commit is contained in:
Julien Pivotto 2024-01-17 18:14:13 +01:00 committed by GitHub
commit fb74a3e2d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -12,5 +12,5 @@ GZIP_OPTS="-fk"
if ! gzip -k -h &>/dev/null; then GZIP_OPTS="-f"; fi
find static -type f -name '*.gz' -delete
find static -type f -exec gzip $GZIP_OPTS '{}' \; -print0 | xargs -0 -I % echo %.gz | xargs echo //go:embed >> embed.go
find static -type f -exec gzip $GZIP_OPTS '{}' \; -print0 | xargs -0 -I % echo %.gz | sort | xargs echo //go:embed >> embed.go
echo var EmbedFS embed.FS >> embed.go