blob: d3edc4c069778a6582d09eabb5bfaf70531bb0a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
diff --git a/build.sh b/build.sh
index 07d7752..440d3e7 100755
--- a/build.sh
+++ b/build.sh
@@ -10,9 +10,16 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
. prepare_vscode.sh
- cd vscode || { echo "'vscode' dir not found"; exit 1; }
+ cd vscode || { echo "Failed to get vscode sources."; exit 1; }
- 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
yarn monaco-compile-check
yarn valid-layers-check
@@ -22,46 +29,9 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
yarn gulp compile-extensions-build
yarn gulp minify-vscode
- if [[ "${OS_NAME}" == "osx" ]]; then
- yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
+ yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
- find "../VSCode-darwin-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
-
- VSCODE_PLATFORM="darwin"
- elif [[ "${OS_NAME}" == "windows" ]]; then
- # in CI, packaging will be done by a different job
- if [[ "${CI_BUILD}" == "no" ]]; then
- . ../build/windows/rtf/make.sh
-
- yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
-
- if [[ "${VSCODE_ARCH}" != "x64" ]]; then
- SHOULD_BUILD_REH="no"
- SHOULD_BUILD_REH_WEB="no"
- fi
- fi
-
- VSCODE_PLATFORM="win32"
- else # linux
- # in CI, packaging will be done by a different job
- if [[ "${CI_BUILD}" == "no" ]]; then
- yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
-
- find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
- fi
-
- VSCODE_PLATFORM="linux"
- fi
-
- if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
- yarn gulp minify-vscode-reh
- yarn gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
- fi
-
- if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
- yarn gulp minify-vscode-reh-web
- yarn gulp "vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
- fi
+ echo "Skipping build of REH (Remote Extension Host)."
cd ..
fi
|