From a910cd62710a4519bdc7781b5135d942ce7b0156 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Mon, 27 Nov 2023 13:58:27 +0000 Subject: [PATCH] Disable build cache Awaiting adapt-cli fix --- lib/AdaptFrameworkBuild.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/AdaptFrameworkBuild.js b/lib/AdaptFrameworkBuild.js index 022831a..80fe2b8 100644 --- a/lib/AdaptFrameworkBuild.js +++ b/lib/AdaptFrameworkBuild.js @@ -186,30 +186,18 @@ class AdaptFrameworkBuild { await this.writeContentJson() if (!this.isExport) { - const cacheDir = path.resolve(framework.getConfig('buildDir'), '.cache') - const cachePath = path.join(cacheDir, this.courseId) - let hasCache = false - try { - await fs.stat(cachePath) - hasCache = true - } catch (e) {} // doesn't exist, no probs try { await AdaptCli.buildCourse({ cwd: this.dir, sourceMaps: !this.isPublish, outputDir: this.buildDir, - cachePath: hasCache && cachePath + cache: false + // cachePath: path.resolve(framework.getConfig('buildDir'), '.cache', this.courseId) }) } catch (e) { throw App.instance.errors.FW_CLI_BUILD_FAILED .setData({ cmd: e.cmd, stderr: e.stderr }) } - if (!hasCache) { - await this.ensureDir(cacheDir) - try { - await fs.copy(path.join(this.buildDir, '.cache'), cachePath) - } catch (e) {} - } } this.isPreview ? await this.createPreview() : await this.createZip()