mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: depshash logging
This commit is contained in:
2
.github/actions/checkout/action.yml
vendored
2
.github/actions/checkout/action.yml
vendored
@@ -38,7 +38,7 @@ runs:
|
||||
- name: Generate DEPS Hash
|
||||
shell: bash
|
||||
run: |
|
||||
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
||||
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash && cat src/electron/.depshash-target
|
||||
echo "DEPSHASH=v1-src-cache-$(sha1sum src/electron/.depshash | cut -f1 -d' ')" >> $GITHUB_ENV
|
||||
- name: Generate SAS Key
|
||||
if: ${{ inputs.generate-sas-token == 'true' }}
|
||||
|
||||
@@ -36,10 +36,12 @@ addAllFiles(path.resolve(__dirname, '../patches'));
|
||||
// Create Hash
|
||||
const hasher = crypto.createHash('SHA256');
|
||||
const addToHashAndLog = (s) => {
|
||||
console.log('Hashing:', s);
|
||||
return hasher.update(s);
|
||||
};
|
||||
addToHashAndLog(`HASH_VERSION:${HASH_VERSIONS[process.platform] || FALLBACK_HASH_VERSION}`);
|
||||
for (const file of filesToHash) {
|
||||
console.log('file:', file, 'hash:', crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'));
|
||||
hasher.update(fs.readFileSync(file));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user