From fce602b11591ef0e779c761dda392ed435c6ed3b Mon Sep 17 00:00:00 2001 From: zombiej Date: Wed, 21 Apr 2021 19:31:25 +0800 Subject: [PATCH] chore: check changelog script skip prerelease --- scripts/check-version-md.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/check-version-md.js b/scripts/check-version-md.js index 67ddc8c401..cf9c8eafca 100644 --- a/scripts/check-version-md.js +++ b/scripts/check-version-md.js @@ -31,6 +31,13 @@ const packageJson = require(join(__dirname, '..', 'package.json')); 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 changeLog = getChangelogByVersion(changeLogContent, version);