Skip to content

Commit

Permalink
feat(projects): the release content contain prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Jan 13, 2024
1 parent 61674b8 commit 40716c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,12 @@ export async function createOptions(options?: Partial<ChangelogOption>) {

opts.prerelease ||= isPrerelease(opts.to);

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

opts.from = allReleaseTags[allReleaseTags.length - 2];
}

return opts;
}

0 comments on commit 40716c3

Please sign in to comment.