Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5ba8dde

Browse files
Use pre-packaged Code
1 parent 37b3785 commit 5ba8dde

File tree

3 files changed

+22
-35
lines changed

3 files changed

+22
-35
lines changed

‎.github/workflows/ci.yaml‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,15 @@ jobs:
145145

146146
# We need to rebuild when we have a new version of Code or when any of
147147
# the patches changed. Use VSCODE_CACHE_VERSION to force a rebuild.
148-
- name: Fetch Code build from cache
149-
id: cache-vscode-2
148+
- name: Fetch prebuilt Code package from cache
149+
id: cache-vscode
150150
uses: actions/cache@v3
151151
with:
152-
path: |
153-
lib/vscode/.build
154-
lib/vscode/out-build
155-
lib/vscode/out-vscode-reh-web
156-
lib/vscode/out-vscode-reh-web-min
157-
key: vscode-reh-build-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff') }}
152+
path: lib/vscode-reh-web-*
153+
key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff') }}
158154

159155
- name: Build vscode
160-
if: steps.cache-vscode-2.outputs.cache-hit != 'true'
156+
if: steps.cache-vscode.outputs.cache-hit != 'true'
161157
run: yarn build:vscode
162158

163159
# Our code imports code from VS Code's `out` directory meaning VS Code

‎ci/build/build-release.sh‎

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,7 @@ EOF
6666

6767
bundle_vscode() {
6868
mkdir -p "$VSCODE_OUT_PATH"
69-
rsync "$VSCODE_SRC_PATH/out-vscode-reh-web${MINIFY:+-min}/" "$VSCODE_OUT_PATH/out"
70-
71-
rsync "$VSCODE_SRC_PATH/.build/extensions/" "$VSCODE_OUT_PATH/extensions"
72-
if [ "$KEEP_MODULES" = 0 ]; then
73-
rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules"
74-
else
75-
rsync "$VSCODE_SRC_PATH/node_modules/" "$VSCODE_OUT_PATH/node_modules"
76-
fi
77-
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions"
78-
rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions"
79-
rsync "$VSCODE_SRC_PATH/extensions/postinstall.js" "$VSCODE_OUT_PATH/extensions"
80-
81-
mkdir -p "$VSCODE_OUT_PATH/resources/"
82-
rsync "$VSCODE_SRC_PATH/resources/" "$VSCODE_OUT_PATH/resources/"
83-
84-
# TODO: We should look into using VS Code's packaging task (see
85-
# gulpfile.reh.js). For now copy this directory into the right spot (for some
86-
# reason VS Code uses a different path in production).
87-
mkdir -p "$VSCODE_OUT_PATH/bin/helpers"
88-
rsync "$VSCODE_SRC_PATH/resources/server/bin/helpers/" "$VSCODE_OUT_PATH/bin/helpers"
89-
chmod +x "$VSCODE_OUT_PATH/bin/helpers/browser.sh"
69+
rsync ./lib/vscode-reh-web-*/ "$VSCODE_OUT_PATH"
9070

9171
# Add the commit, date, our name, links, and enable telemetry. This just makes
9272
# telemetry available; telemetry can still be disabled by flag or setting.
@@ -135,6 +115,11 @@ EOF
135115

136116
rsync "$VSCODE_SRC_PATH/remote/yarn.lock" "$VSCODE_OUT_PATH/yarn.lock"
137117

118+
if [ "$KEEP_MODULES" = 0 ]; then
119+
rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules"
120+
rm -Rf "$VSCODE_OUT_PATH/node_modules"
121+
fi
122+
138123
pushd "$VSCODE_OUT_PATH"
139124
symlink_asar
140125
popd

‎ci/dev/test-unit.sh‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ main() {
1414
# Our code imports from `out` in order to work during development but if you
1515
# have only built for production you will have not have this directory. In
1616
# that case symlink `out` to a production build directory.
17-
local vscode="lib/vscode"
18-
local link="$vscode/out"
19-
local target="out-build"
20-
if [[ ! -e $link ]] && [[ -d $vscode/$target ]]; then
21-
ln -s "$target" "$link"
17+
if [[ ! -e lib/vscode/out ]]; then
18+
pushd lib
19+
local out=(vscode-reh-web-*)
20+
if [[ -d "${out[0]}" ]]; then
21+
ln -s "../${out[0]}/out" ./vscode/out
22+
else
23+
echo "Could not find lib/vscode/out or lib/vscode-reh-web-*"
24+
echo "Code must be built before running unit tests"
25+
exit 1
26+
fi
27+
popd
2228
fi
2329

2430
# We must keep jest in a sub-directory. See ../../test/package.json for more

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /