diff --git a/build/update_patches.sh b/build/update_patches.sh
new file mode 100755
index 0000000..d861b8c
--- /dev/null
+++ b/build/update_patches.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+cd vscode || { echo "'vscode' dir not found"; exit 1; }
+
+git add .
+git reset -q --hard HEAD
+
+for file in ../patches/*.patch; do
+ if [ -f "${file}" ]; then
+ echo applying patch: "${file}"
+ git apply --ignore-whitespace "${file}"
+ if [ $? -ne 0 ]; then
+ echo failed to apply patch "${file}"
+ git apply --reject "${file}"
+ read -p "Press any key when the conflict have been resolved..." -n1 -s
+ git diff > "${file}"
+ fi
+ git add .
+ git reset -q --hard HEAD
+ fi
+done
diff --git a/docs/build.md b/docs/build.md
index b4d1d1f..08e9366 100644
--- a/docs/build.md
+++ b/docs/build.md
@@ -8,7 +8,11 @@
- [Windows](#dependencies-windows)
- [Build Scripts](#build-scripts)
- [Build in Docker](#build-docker)
+ - [X64](#build-docker-x64)
+ - [ARM 32bits](#build-docker-arm32)
- [Patch Update Process](#patch-update-process)
+ - [Semi-Automated](#patch-update-process-semiauto)
+ - [Manual](#patch-update-process-manual)
## Dependencies
@@ -55,7 +59,7 @@ Each platform has its build helper script in the directory `build`.
To build for Linux, you can alternatively build VSCodium in docker
-### X64
+### X64
Firstly, create the container with:
```
@@ -80,7 +84,7 @@ export VSCODE_ARCH=x64
./build.sh
```
-### ARM 32bits
+### ARM 32bits
Firstly, create the container with:
```
@@ -107,8 +111,20 @@ export npm_config_force_process_config="true"
## Patch Update Process
+## Semi-Automated
+
- run `./build/build_.sh`, if a patch is failing then,
-- open vscode directory in vscodium
+- run `./build/update_patches.sh`
+- when the script pause at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium**
+- fix all the `*.rej` files
+- run `yarn watch`
+- run `./script/code.sh` until everything ok
+- press any key to continue the script `update_patches.sh`
+
+## Manual
+
+- run `./build/build_.sh`, if a patch is failing then,
+- open `vscode` directory in **VSCodium**
- revert all changes
- run `git apply --reject ../patches/.patch`
- fix all the `*.rej` files