From f29e0adb964cb9de93c56c2e2ebcd6c1fc00e12d Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Tue, 2 Jan 2024 12:00:42 +0100 Subject: [PATCH] scripts: sort file list in embed directive Otherwise the resulting string depends on find, which afaict depends on the underlying filesystem. A stable file list make it easier to detect UI changes in downstreams that need to track UI assets. Signed-off-by: Jan Fajerski --- scripts/compress_assets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/compress_assets.sh b/scripts/compress_assets.sh index 615e30c43..6608677bb 100755 --- a/scripts/compress_assets.sh +++ b/scripts/compress_assets.sh @@ -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