Skip to content

Commit 168ccb0

Browse files
committed
Prevent cache changes when patch updates
1 parent 58f7f5b commit 168ccb0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: "MacOS build"
3131
os: osx
3232
if: tag IS blank
33-
script: travis_wait 40 scripts/ci.bash
33+
script: travis_wait 60 scripts/ci.bash
3434

3535
git:
3636
depth: 3

scripts/build.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,16 @@ class Builder {
303303
]);
304304
});
305305

306-
// This is so it doesn't get cached along with VS Code. There's no point
307-
// since there isn't anything like an incremental build.
308-
await this.task("Removing build files for smaller cache", () => {
306+
// Prevent needless cache changes.
307+
await this.task("Cleaning for smaller cache", () => {
309308
return Promise.all([
310309
fs.remove(serverPath),
311310
fs.remove(path.join(vscodeSourcePath, "out-vscode")),
312311
fs.remove(path.join(vscodeSourcePath, "out-vscode-min")),
313312
fs.remove(path.join(vscodeSourcePath, "out-build")),
313+
util.promisify(cp.exec)("git reset --hard", { cwd: vscodeSourcePath }).then(() => {
314+
return util.promisify(cp.exec)("git clean -fd", { cwd: vscodeSourcePath });
315+
}),
314316
]);
315317
});
316318

0 commit comments

Comments
 (0)