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

scripts: sort file list in embed directive
pull/13169/head
Julien Pivotto 10 months ago committed by GitHub
commit fb74a3e2d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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

Loading…
Cancel
Save