Browse Source

build: depshash logging

Samuel Attard 6 months ago
parent
commit
6db7a0f0af
2 changed files with 3 additions and 1 deletions
  1. 1 1
      .github/actions/checkout/action.yml
  2. 2 0
      script/generate-deps-hash.js

+ 1 - 1
.github/actions/checkout/action.yml

@@ -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' }}

+ 2 - 0
script/generate-deps-hash.js

@@ -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));
 }