build: regroup patches per os

This commit is contained in:
Baptiste Augrain 2024-07-08 15:58:38 +02:00
parent 921b32a8fd
commit 442fd43ea5
9 changed files with 17 additions and 15 deletions

View file

@ -33,8 +33,8 @@ if [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
echo "7244465fe0c1a6ac6e34fe765a9d90fe0017b1a6d3406fd6b8dd9f5d2c8c9df5 *electron-v29.4.0-linux-riscv64.zip" >> build/checksums/electron.txt
fi
if [[ -d "../patches/${OS_NAME}/client/" ]]; then
for file in "../patches/${OS_NAME}/client/"*.patch; do
if [[ -d "../patches/linux/client/" ]]; then
for file in "../patches/linux/client/"*.patch; do
if [[ -f "${file}" ]]; then
echo applying patch: "${file}";
if ! git apply --ignore-whitespace "${file}"; then

View file

@ -13,8 +13,13 @@ cd vscode || { echo "'vscode' dir not found"; exit 1; }
GLIBC_VERSION="2.17"
GLIBCXX_VERSION="3.4.26"
NODE_VERSION="16.20.2"
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
GLIBC_VERSION="2.28"
elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
# Unofficial RISC-V nodejs builds doesn't provide v16.x
NODE_VERSION="18.18.1"
fi
export VSCODE_PLATFORM='linux'
@ -39,14 +44,20 @@ elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:focal-devtoolset-riscv64"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
# Unofficial RISC-V nodejs builds doesn't provide v16.x
sed -i '/target/s/"16.*"/"18.18.1"/' remote/.yarnrc
fi
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
if [[ -d "../patches/${OS_NAME}/reh/" ]]; then
for file in "../patches/${OS_NAME}/reh/"*.patch; do
sed -i "/target/s/\"20.*\"/\"${NODE_VERSION}\"/" remote/.yarnrc
if [[ "${NODE_VERSION}" != 16* ]]; then
if [[ -f "../patches/linux/reh/node16.patch" ]]; then
mv "../patches/linux/reh/node16.patch" "../patches/linux/reh/node16.patch.no"
fi
fi
if [[ -d "../patches/linux/reh/" ]]; then
for file in "../patches/linux/reh/"*.patch; do
if [[ -f "${file}" ]]; then
echo applying patch: "${file}";
if ! git apply --ignore-whitespace "${file}"; then

View file

@ -19,15 +19,6 @@ index c2b81d0..2e94d99 100644
- }
-
return result.pipe(vfs.dest(destination));
diff --git a/remote/.yarnrc b/remote/.yarnrc
index 4c99388..71a7164 100644
--- a/remote/.yarnrc
+++ b/remote/.yarnrc
@@ -1,3 +1,3 @@
disturl "https://nodejs.org/dist"
-target "20.11.1"
+target "16.20.2"
ms_build_id "275039"
diff --git a/remote/package.json b/remote/package.json
index b84f513..42d8e41 100644
--- a/remote/package.json