Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(scripts): allow forcing release #3305

Merged
merged 1 commit into from
Jul 2, 2024
Merged
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
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
Loading