From 50719113b114106b7a05a4536198b53f2c4406bc Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 7 Jun 2021 20:09:35 +0200 Subject: [PATCH] Raise memory limits in build scripts. Also build edge version on the CI --- scripts/build-and-deploy.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/build-and-deploy.sh b/scripts/build-and-deploy.sh index 732e0ee..75377e8 100755 --- a/scripts/build-and-deploy.sh +++ b/scripts/build-and-deploy.sh @@ -37,6 +37,9 @@ if [ ! -z "$GIT_COMMIT" ] ; then fi fi +# let's raise RAM limit for npm command globally +alias npm='node --max_old_space_size=2048 /usr/bin/npm' + npm ci rm -rf ./dist-zip || true # no big deal if ./dist-zip doesn't exist @@ -46,7 +49,7 @@ mkdir dist-zip # create it back # build firefox # npm run "${BUILD_SCRIPT}" -node scripts/build-zip.js ff nightly +node --max-old-space-size=2048 scripts/build-zip.js ff nightly # if [ ! -z "${AMO_API_KEY}" ] ; then # if [ ! -z "${AMO_API_SECRET}" ] ; then # web-ext sign --source-dir ./dist --api-key "${AMO_API_KEY}" --api-secret "${AMO_API_SECRET}" @@ -57,12 +60,18 @@ node scripts/build-zip.js ff nightly # build chrome # npm run "${BUILD_SCRIPT}-chrome" -node scripts/build-zip.js chrome nightly - +node --max-old-space-size=2048 scripts/build-zip.js chrome nightly # #./scripts/build-crx.sh # +# +# build edge +# +npm run "${BUILD_SCRIPT}-edge" +node --max-old-space-size=2048 scripts/build-zip.js chrome nightly + + ###################################### # UPLOAD TO WEB SERVER ###################################### @@ -76,7 +85,6 @@ echo "Uploading to server ..." scp -i ~/.ssh/id_rsa -r ./dist-zip/* "ultrawidify-uploader@${RELEASE_SERVER}:${RELEASE_DIRECTORY}${BUILD_CHANNEL_DIRECTORY}" - ###################################### # Build finished message ######################################