blob: 317d2766ea066b1eba740a7fb118b6507a861d6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
diff --git a/build.sh b/build.sh
index 84a75bc..1b196fa 100755
--- a/build.sh
+++ b/build.sh
@@ -12,7 +12,15 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
cd vscode || { echo "'vscode' dir not found"; exit 1; }
- export NODE_OPTIONS="--max-old-space-size=8192"
+ #export NODE_OPTIONS="--max-old-space-size=8192"
+ # Build native modules for system electron
+ # # ref: https://gitlab.archlinux.org/archlinux/packaging/packages/code/-/blob/main/PKGBUILD
+ _target=$(</usr/lib/$_electron/version)
+ sed -i "s/^target.*/target=\"${_target//v/}\"/" .npmrc
+ # # During build, electron source will be downloaded
+ # # In this package, the version downloaded is the same as the system version
+ # # Thus, replace the checksum file with the one for the system version
+ curl -L https://github.com/electron/electron/releases/download/v$_target/SHASUMS256.txt > build/checksums/electron.txt
export VSCODE_PUBLISH_COUNTER=1
npm run gulp vscode-min-prepack
|