You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
prometheus/scripts/compress_assets.sh

12 lines
295 B

#!/usr/bin/env bash
#
# compress static assets
set -euo pipefail
cd web/ui
cp embed.go.tmpl embed.go
find static -type f -name '*.gz' -delete
find static -type f -exec gzip -fk '{}' \; -print0 | xargs -0 -I % echo %.gz | xargs echo //go:embed >> embed.go
echo var EmbedFS embed.FS >> embed.go