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

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

25
changelog.md Normal file
View File

@ -0,0 +1,25 @@
# Changelog
## {{nextVersion}} - {{nextVersionMessage}}
- Fix: General core updates
## 1.9.99
- Fix: General core updates
## 1.9.98
- Fix: General core updates
## 1.9.97
- Fix: General core updates
## 1.9.96
- Fix: General core updates
## 1.9.95
- Fix: General core updates

View File

@ -1,8 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@git.zone/cli',
version: '1.9.99',
version: '1.9.100',
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
}

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`));