mirror of https://github.com/prometheus/prometheus
Merge pull request #526 from prometheus/lightening-embedding
Dramatically decrease resources for file embedding.pull/530/head
commit
0ae2c1fc18
|
@ -21,9 +21,9 @@ do
|
||||||
find . -type f \! -name \*.map \! -name bootstrap.js \! -name bootstrap-theme.css \! -name bootstrap.css | while read file
|
find . -type f \! -name \*.map \! -name bootstrap.js \! -name bootstrap-theme.css \! -name bootstrap.css | while read file
|
||||||
do
|
do
|
||||||
name=$(echo "${file}"|sed 's|\.\/||')
|
name=$(echo "${file}"|sed 's|\.\/||')
|
||||||
echo "\"$name\": {"
|
echo -n "\"$name\": []byte(\""
|
||||||
gzip -9 -c "${file}" | xxd -p |sed 's/\(..\)/0x\1, /g'
|
gzip -9 -c "${file}" | xxd -p | tr -d '\n' | sed 's/\(..\)/\\x\1/g'
|
||||||
echo "},"
|
echo "\"),"
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
echo "},"
|
echo "},"
|
||||||
|
|
Loading…
Reference in New Issue