fix(mod_commit): Fix variable reassignment issue in changelog writing step

This commit is contained in:
2024-06-23 13:35:28 +02:00
parent 7e0a00324b
commit 53eb47672c
3 changed files with 30 additions and 5 deletions

View File

@ -70,9 +70,9 @@ export const run = async (argvArg: any) => {
await commitInfo.writeIntoPotentialDirs();
logger.log('info', `Writing changelog.md ...`);
const changelog = nextCommitObject.changelog;
changelog.replaceAll('{{nextVersion}}', (await commitInfo.getNextPlannedVersion()).versionString);
changelog.replaceAll('{{nextVersionMessage}}', commitString);
let changelog = nextCommitObject.changelog;
changelog = changelog.replaceAll('{{nextVersion}}', (await commitInfo.getNextPlannedVersion()).versionString);
changelog = changelog.replaceAll('{{nextVersionMessage}}', commitString);
await plugins.smartfile.memory.toFs(changelog, plugins.path.join(paths.cwd, `changelog.md`));