diff --git a/.gear/generate b/.gear/generate index d76dc4ab6..46687d1e6 100755 --- a/.gear/generate +++ b/.gear/generate @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Re-generate React index.html.gz for llama-server cd "$(git rev-parse --show-toplevel)" @@ -8,16 +8,18 @@ hsh --ini hsh-install git npm hsh-copy . build hsh-run --rooter -- bash -c 'echo nameserver 1.1.1.1 > /etc/resolv.conf' +f=tools/server/public/index.html.gz +printf '%s\n\n' "ALT: Re-generate $f" > .git/NPM_I.log share_network=1 \ -hsh-run --mountpoints=/proc -- bash -xe <<-EOF +hsh-run --mountpoints=/proc -- bash -e <<-EOF |& tee -a .git/NPM_I.log cd /usr/src/build + set -x cd tools/server/webui npm i - npm audit fix + npm audit --audit-level=critical fix + du -sh node_modules npm run build EOF -f=tools/server/public/index.html.gz hsh-run -- base64 "/usr/src/build/$f" | base64 -d > "$f" - git add "$f" -git diff --cached --quiet || git commit -m "ALT: Re-generate $f" +git diff --cached --quiet || git commit -F .git/NPM_I.log