Skip to content

Commit

Permalink
chore(scripts): allow forcing release (#3305)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Jul 2, 2024
1 parent 766f801 commit fbfb731
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/release/createReleasePR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export async function decideReleaseStrategy({
*
* Gracefully exits if there is none.
*/
async function getCommits(): Promise<{
async function getCommits(force?: boolean): Promise<{
validCommits: PassedCommit[];
skippedCommits: string;
}> {
Expand Down Expand Up @@ -354,7 +354,7 @@ async function getCommits(): Promise<{
validCommits.push(commit);
}

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

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

const versions = await decideReleaseStrategy({
versions: readVersions(),
Expand Down

0 comments on commit fbfb731

Please sign in to comment.