fix(mod_commit): Fix changelog template rendering by removing extra new line when no version details are provided.

This commit is contained in:
2024-06-23 23:52:48 +02:00
parent f1d75a3aba
commit c99ff2556e
5 changed files with 73 additions and 67 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/cli',
version: '1.9.120',
version: '1.9.121',
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
}

View File

@ -77,7 +77,7 @@ export const run = async (argvArg: any) => {
if (nextCommitObject.recommendedNextVersionDetails?.length > 0) {
changelog = changelog.replaceAll('{{nextVersionDetails}}', '- ' + nextCommitObject.recommendedNextVersionDetails.join('\n- '));
} else {
changelog = changelog.replaceAll('\n\n{{nextVersionDetails}}', '');
changelog = changelog.replaceAll('\n{{nextVersionDetails}}', '');
}
await plugins.smartfile.memory.toFs(changelog, plugins.path.join(paths.cwd, `changelog.md`));