Skip to content

Commit fbfb731

Browse files
authored
chore(scripts): allow forcing release (#3305)
1 parent 766f801 commit fbfb731

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/release/createReleasePR.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export async function decideReleaseStrategy({
321321
*
322322
* Gracefully exits if there is none.
323323
*/
324-
async function getCommits(): Promise<{
324+
async function getCommits(force?: boolean): Promise<{
325325
validCommits: PassedCommit[];
326326
skippedCommits: string;
327327
}> {
@@ -354,7 +354,7 @@ async function getCommits(): Promise<{
354354
validCommits.push(commit);
355355
}
356356

357-
if (validCommits.length === 0) {
357+
if (!force && validCommits.length === 0) {
358358
console.log(
359359
chalk.black.bgYellow('[INFO]'),
360360
`Skipping release because no valid commit has been added since \`released\` tag.`,
@@ -505,7 +505,7 @@ export async function createReleasePR({
505505
}
506506

507507
console.log('Searching for commits since last release...');
508-
const { validCommits, skippedCommits } = await getCommits();
508+
const { validCommits, skippedCommits } = await getCommits(releaseType !== undefined);
509509

510510
const versions = await decideReleaseStrategy({
511511
versions: readVersions(),

0 commit comments

Comments
 (0)