Skip to content

Commit 2713b10

Browse files
committed
Cache hashes now use md5 for speed improvements; Removing source archive no longer triggers build for the no-longer-existing archive
1 parent 5f39d87 commit 2713b10

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/handlers/BuildProject.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import crypto from 'crypto';
1010
import { getFilesInDirectory } from '../utils';
1111

1212
const generateHash = (string: string) => {
13-
const hash = crypto.createHash('sha256');
13+
const hash = crypto.createHash('md5');
1414
hash.update(string);
1515

1616
return hash.digest('hex');
@@ -194,6 +194,7 @@ export const buildProject = async (log: Logger, state: AppState, { projectPath,
194194
// Clear the previous cache for that file.
195195
if (!currentArchiveCache[file]) {
196196
log(`============== Clearing cached file ${file} as it is no longer needed...`);
197+
generateTtarchArchives.add(archiveName);
197198
tasks.push(fs.rm(path.join(cachePath, archiveName, file), { recursive: true }).catch());
198199
}
199200
})
@@ -213,9 +214,7 @@ export const buildProject = async (log: Logger, state: AppState, { projectPath,
213214
} catch (e) {
214215
log(`============== There was an error building the project!`);
215216
log(`${e}`);
216-
log(`============== Cleaning up...`);
217217

218-
await fs.rmdir(tempPath, {recursive: true});
219218
return;
220219
}
221220

0 commit comments

Comments
 (0)