workaround transient npm failures (#4989)

This commit is contained in:
Alex Lam S.L
2021-05-30 10:19:29 +01:00
committed by GitHub
parent 06e3dbc089
commit f4f0d2a2dd
11 changed files with 95 additions and 21 deletions

View File

@@ -14,6 +14,13 @@ minify_in_situ() {
uglify-js $ARGS
}
npm_install() {
PKG="$1"
while !(npm install $PKG); do
while !(npm cache clean --force); do echo "'npm cache clean' failed - retrying..."; done
done
}
rm -rf tmp/acorn \
&& git clone https://github.com/acornjs/acorn.git tmp/acorn \
&& cd tmp/acorn \
@@ -89,7 +96,7 @@ minify_in_situ "acorn/src" \
&& minify_in_situ "acorn-loose/src" \
&& minify_in_situ "acorn-walk/src" \
&& rm -rf node_modules \
&& npm install \
&& npm_install \
&& rm -rf acorn/dist acorn-loose/dist acorn-walk/dist \
&& npm run build \
&& minify_in_situ "acorn/dist" \