Skip to content

Commit

Permalink
Disable build cache
Browse files Browse the repository at this point in the history
Awaiting adapt-cli fix
  • Loading branch information
taylortom authored Nov 27, 2023
1 parent 98a34b8 commit a910cd6
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions lib/AdaptFrameworkBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit a910cd6

Please sign in to comment.