From 0baf7a131d9ed9249e1c8fbd4ce4229e4a608db6 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Sat, 2 Nov 2024 03:20:23 +0100 Subject: [PATCH] build: make it easier on windows --- build/build.sh | 4 +++- prepare_vscode.sh | 28 ++++++++++------------------ stable.json | 4 ++-- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/build/build.sh b/build/build.sh index 8b27da2..cc11a9a 100755 --- a/build/build.sh +++ b/build/build.sh @@ -86,7 +86,7 @@ if [[ "${SKIP_SOURCE}" == "no" ]]; then echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\"" >> build.env else if [[ "${SKIP_ASSETS}" != "no" ]]; then - rm -rf VSCode* + rm -rf vscode-* VSCode-* fi . build.env @@ -104,6 +104,8 @@ if [[ "${SKIP_BUILD}" == "no" ]]; then git add . git reset -q --hard HEAD + rm -rf .build out* + cd .. fi diff --git a/prepare_vscode.sh b/prepare_vscode.sh index e43c187..932317a 100755 --- a/prepare_vscode.sh +++ b/prepare_vscode.sh @@ -78,29 +78,21 @@ if [[ "${OS_NAME}" == "linux" ]]; then export npm_config_arm_version=7 fi elif [[ "${OS_NAME}" == "windows" ]]; then - # TODO: Should be replaced with upstream URL once https://github.com/nodejs/node-gyp/pull/2825 - # gets merged. - rm -rf .build/node-gyp - mkdir -p .build/node-gyp - cd .build/node-gyp - - git config --global user.email "$( echo "${GITHUB_USERNAME}" | awk '{print tolower($0)}' )-ci@not-real.com" - git config --global user.name "${GITHUB_USERNAME} CI" - git clone https://github.com/nodejs/node-gyp.git . - git checkout v10.0.1 - npm install - - npm_config_node_gyp="$( pwd )/bin/node-gyp.js" - export npm_config_node_gyp - - cd ../.. - if [[ "${npm_config_arch}" == "arm" ]]; then export npm_config_arm_version=7 fi fi -npm ci +for i in {1..5}; do # try 5 times + npm ci && break + if [[ $i == 3 ]]; then + echo "Npm install failed too many times" >&2 + exit 1 + fi + echo "Npm install failed $i, trying again..." + + sleep $(( 15 * (i + 1))) +done setpath() { local jsonTmp diff --git a/stable.json b/stable.json index 738f0a9..88e860f 100644 --- a/stable.json +++ b/stable.json @@ -1,4 +1,4 @@ { - "tag": "1.95.0", - "commit": "912bb683695358a54ae0c670461738984cbb5b95" + "tag": "1.95.1", + "commit": "65edc4939843c90c34d61f4ce11704f09d3e5cb6" }