spec: Add .gear/generate to re-generate React for llama-server
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
This commit is contained in:
parent
8ef7a5cd9e
commit
7bba0c56dd
1 changed files with 23 additions and 0 deletions
23
.gear/generate
Executable file
23
.gear/generate
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
# Re-generate React index.html.gz for llama-server
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
|
||||
set -exu
|
||||
hsh --ini
|
||||
hsh-install git npm
|
||||
hsh-copy . build
|
||||
hsh-run --rooter -- bash -c 'echo nameserver 1.1.1.1 > /etc/resolv.conf'
|
||||
share_network=1 \
|
||||
hsh-run --mountpoints=/proc -- bash -xe <<-EOF
|
||||
cd /usr/src/build
|
||||
cd tools/server/webui
|
||||
npm i
|
||||
npm audit fix
|
||||
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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue