Skip to content

Commit 0de8252

Browse files
build: debug depshash
1 parent aa87ba1 commit 0de8252

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

script/generate-deps-hash.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,19 @@ addAllFiles(path.resolve(__dirname, '../patches'));
3535

3636
// Create Hash
3737
const hasher = crypto.createHash('SHA256');
38-
hasher.update(`HASH_VERSION:${HASH_VERSIONS[process.platform] || FALLBACK_HASH_VERSION}`);
38+
const addToHashAndLog = (s) => {
39+
console.log('Hashing:', s);
40+
return hasher.update(s);
41+
};
42+
addToHashAndLog(`HASH_VERSION:${HASH_VERSIONS[process.platform] || FALLBACK_HASH_VERSION}`);
3943
for (const file of filesToHash) {
44+
console.log('Hashing Content:', file, crypto.createHash('SHA256').update(fs.readFileSync(file)).digest('hex'));
4045
hasher.update(fs.readFileSync(file));
4146
}
4247

4348
// Add the GCLIENT_EXTRA_ARGS variable to the hash
4449
const extraArgs = process.env.GCLIENT_EXTRA_ARGS || 'no_extra_args';
45-
hasher.update(extraArgs);
50+
addToHashAndLog(extraArgs);
4651

4752
const effectivePlatform = extraArgs.includes('host_os=mac') ? 'darwin' : process.platform;
4853

0 commit comments

Comments
 (0)