Skip deleted file when updating release version in comments

This commit is contained in:
Hadrien Croubois
2022-10-17 18:52:38 +02:00
parent 08d5e4a9b0
commit a71caa28e7

View File

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