Browse Source

Skip deleted file when updating release version in comments

Hadrien Croubois 3 years ago
parent
commit
a71caa28e7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/release/update-comment.js

+ 1 - 1
scripts/release/update-comment.js

@@ -22,7 +22,7 @@ const [ tag ] = run('git', 'tag')
 // Ordering tag → HEAD is important here.
 const files = run('git', 'diff', tag, 'HEAD', '--name-only', 'contracts/**/*.sol')
   .split(/\r?\n/)
-  .filter(file => file && !file.match(/mock/i));
+  .filter(file => file && !file.match(/mock/i) && fs.existsSync(file));
 
 for (const file of files) {
   const current = fs.readFileSync(file, 'utf8');