.gear/generate: Add proxy and checklist support

Safe-chain: Unhandled promise rejection: Error: Error parsing malware database: Invalid response body while trying to fetch https://malware-list.aikido.dev/malware_predictions.json: read ETIMEDOUT

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
This commit is contained in:
Vitaly Chikunov 2026-01-20 06:29:26 +03:00
parent bfba6a3251
commit 42d6c582aa

View file

@ -3,15 +3,17 @@
cd "$(git rev-parse --show-toplevel)"
set -exu
set -exu -o pipefail
hsh --ini
hsh-install git npm
hsh-copy . build
hsh-run --rooter -- bash -c 'echo nameserver 1.1.1.1 > /etc/resolv.conf'
hsh-run --rooter -- bash -c 'echo precedence ::ffff:0:0/96 100 > /etc/gai.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 -e <<-EOF |& tee -a .git/NPM_I.log
export NO_PROXY=${NO_PROXY@Q} HTTPS_PROXY=${HTTPS_PROXY@Q}
set -x
mkdir ~/.npm-global
npm config set prefix ~/.npm-global
@ -30,3 +32,4 @@ EOF
hsh-run -- base64 "/usr/src/build/$f" | base64 -d > "$f"
git add "$f"
git diff --cached --quiet || git commit -F .git/NPM_I.log
gear-checklist --update generate-index.html