Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions build/prepublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ const fileVersions = [
});

const versions = fileVersions.map(({ file, version }) => {
console.log(` ∟ The version in [${chalk.blueBright(file)}] is ${chalk.cyanBright.bold(version)}`);
const color = version.indexOf('rc') > -1 ? chalk.magenta : chalk.cyanBright;
console.log(` ∟ The version in [${chalk.blueBright(file)}] is ${color.bold(version)}`);
return version;
});

if (new Set(versions).size !== 1) {
// Ignore rc because when releasing an rc version on npm,
// the version in package.json contains -rc.x while src doesn't.
const versionPrefixes = versions.map(version => version.split('-rc')[0]);
if (new Set(versionPrefixes).size !== 1) {
console.log();
console.error(chalk.red('❌ Version does not match! Please check and rerun the release script via:'));
console.log();
Expand Down