From 168ccb0dfceeaa78d83f2a6c3d3c518b169803ba Mon Sep 17 00:00:00 2001 From: Asher Date: Fri, 25 Oct 2019 13:12:04 -0500 Subject: [PATCH] Prevent cache changes when patch updates --- .travis.yml | 2 +- scripts/build.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 214d8419..1381c6c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ jobs: - name: "MacOS build" os: osx if: tag IS blank - script: travis_wait 40 scripts/ci.bash + script: travis_wait 60 scripts/ci.bash git: depth: 3 diff --git a/scripts/build.ts b/scripts/build.ts index ab9c1269..57f0fe39 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -303,14 +303,16 @@ class Builder { ]); }); - // This is so it doesn't get cached along with VS Code. There's no point - // since there isn't anything like an incremental build. - await this.task("Removing build files for smaller cache", () => { + // Prevent needless cache changes. + await this.task("Cleaning for smaller cache", () => { return Promise.all([ fs.remove(serverPath), fs.remove(path.join(vscodeSourcePath, "out-vscode")), fs.remove(path.join(vscodeSourcePath, "out-vscode-min")), fs.remove(path.join(vscodeSourcePath, "out-build")), + util.promisify(cp.exec)("git reset --hard", { cwd: vscodeSourcePath }).then(() => { + return util.promisify(cp.exec)("git clean -fd", { cwd: vscodeSourcePath }); + }), ]); });