From a71caa28e76c1d732cfa31ef31284b22712ee4da Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 17 Oct 2022 18:52:38 +0200 Subject: [PATCH] Skip deleted file when updating release version in comments --- scripts/release/update-comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release/update-comment.js b/scripts/release/update-comment.js index 0767234a8..7baf8c2b4 100755 --- a/scripts/release/update-comment.js +++ b/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');