From 96368031dc68bfce2005216c50dd8f45d9a8eeec Mon Sep 17 00:00:00 2001 From: Brad White Date: Wed, 13 Nov 2024 20:44:57 -0700 Subject: [PATCH] fix output --- src/pages/release-notes/release-note-output.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/release-notes/release-note-output.tsx b/src/pages/release-notes/release-note-output.tsx index 3bf374c..2f8f702 100644 --- a/src/pages/release-notes/release-note-output.tsx +++ b/src/pages/release-notes/release-note-output.tsx @@ -18,7 +18,8 @@ interface Props { export const ReleaseNoteOutput: FC = ({ prs, version: ver }) => { const config = useActiveConfig(); const version = ver.replace(/^v(.*)$/, '$1'); - const isPatchVersion = semver.patch(version) !== 0; + const isServerless = ver === 'serverless'; + const isPatchVersion = isServerless ? false : semver.patch(version) !== 0; const renderedGroups = useMemo(() => { const grouped = groupPrs(prs, { includeFeaturesInEnhancements: true }); @@ -54,7 +55,7 @@ export const ReleaseNoteOutput: FC = ({ prs, version: ver }) => { version, minorVersion: version.replace(/\.\d+$/, ''), prs: renderedGroups, - nextMajorVersion: `${semver.major(version) + 1}.0.0`, + nextMajorVersion: isServerless ? '' : `${semver.major(version) + 1}.0.0`, isPatchRelease: isPatchVersion, } ).trim(), @@ -62,6 +63,7 @@ export const ReleaseNoteOutput: FC = ({ prs, version: ver }) => { config.templates.pages.patchReleaseNotes, config.templates.pages.releaseNotes, isPatchVersion, + isServerless, renderedGroups, version, ]