Skip to content

Commit fdf6bef

Browse files
committed
ci(release): Prevent publishing when no projects were versioned
1 parent a3c4510 commit fdf6bef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/scripts/release/release.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ import { handleChangelog } from './changelog';
9494
} else {
9595
console.log(
9696
printHeader('Publish', 'cyanBright'),
97-
`Skip publishing ${projectName} as newVersion is ${chalk.grey('null')}`
97+
`Skipped publishing ${projectName} as ${chalk.whiteBright('newVersion')} is ${chalk.grey('null')}`
9898
);
9999
}
100100
} else {
101101
console.log(
102102
printHeader('Changelog', 'yellow'),
103-
`Skip generating changelog as versionData is ${chalk.grey('null')}`
103+
`Skipped generating changelog as ${chalk.whiteBright('versionData')} is ${chalk.grey('null')}`
104104
);
105105
}
106106
}
@@ -112,10 +112,10 @@ import { handleChangelog } from './changelog';
112112
console.log(printHeader('mode', 'cyanBright'), `Skip publish, version and changelog only\n`);
113113
return process.exit(0);
114114
} else {
115-
if (publishOnly && projects?.length === 0) {
115+
if (projectsList.size === 0) {
116116
console.error(
117117
printHeader('Projects', 'redBright'),
118-
`Trying to publish only but no projects were specified. This would release ALL projects with tag '${tag}'! Exiting...`
118+
`Trying to publish but no projects were specified. This would release ALL projects with tag '${tag}'! Exiting...`
119119
);
120120
return process.exit(1);
121121
}

0 commit comments

Comments
 (0)