Skip to content

Commit

Permalink
Properly handle forced patch->minor in pre-release (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericanderson authored Jun 17, 2024
1 parent c1924df commit 0f17ee2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/tool.release/src/mutateReleasePlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ export function mutateReleasePlan(
for (const q of releasePlan.releases) {
if (releaseType === "main" && q.type === "patch") {
q.type = "minor";
const suffix = q.newVersion.split("-")[1];
q.newVersion = inc(q.oldVersion, "minor")!;
if (suffix) {
// restore suffix
q.newVersion += `-${suffix}`;
}
}
}
}

0 comments on commit 0f17ee2

Please sign in to comment.