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/rollup \
&& git clone https://github.com/rollup/rollup.git tmp/rollup \
&& cd tmp/rollup \
@@ -77,7 +84,7 @@ minify_in_situ "bin" \
&& minify_in_situ "browser" \
&& minify_in_situ "src" \
&& rm -rf node_modules \
&& npm ci \
&& npm_install \
&& rm -rf dist \
&& npm run build \
&& minify_in_situ "dist" \