chore: check changelog script skip prerelease

This commit is contained in:
zombiej 2021-04-21 19:31:25 +08:00
parent ad78751f33
commit fce602b115

View File

@ -31,6 +31,13 @@ const packageJson = require(join(__dirname, '..', 'package.json'));
const { version } = packageJson; const { version } = packageJson;
if (!/^\d+\.\d+\.\d+$/.test(version)) {
console.log('\n');
console.log(chalk.blue('[check-version-md]: Prerelease Version. Skipped.'));
console.log('\n');
process.exit(0);
}
const changeLogContent = fs.readFileSync(join(__dirname, '..', 'CHANGELOG.en-US.md')).toString(); const changeLogContent = fs.readFileSync(join(__dirname, '..', 'CHANGELOG.en-US.md')).toString();
const changeLog = getChangelogByVersion(changeLogContent, version); const changeLog = getChangelogByVersion(changeLogContent, version);