Skip to content

Commit

Permalink
fix(projects): fix create options
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Mar 3, 2024
1 parent 8f2be0e commit 9403a05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export async function createOptions(options?: Partial<ChangelogOption>) {

const isFromPrerelease = isPrerelease(opts.from);
if (!isPrerelease(newVersion) && isFromPrerelease) {
const allReleaseTags = opts.tags.filter(tag => !isPrerelease(tag));
const nVersion = opts.newVersion;

const allReleaseTags = opts.tags.filter(tag => !isPrerelease(tag) && tag !== nVersion);

opts.from = allReleaseTags[allReleaseTags.length - 1];
}
Expand Down

0 comments on commit 9403a05

Please sign in to comment.