fix(commands): have unreleased section for changelog

This commit is contained in:
2023-12-16 17:21:07 +02:00
parent d1099c1e69
commit 8e460614f5

View File

@@ -258,13 +258,15 @@ program
console.log("Generation of this changelog is based on commits"); console.log("Generation of this changelog is based on commits");
for (const commit of commits) { for (const commit of commits) {
const tag = semver.sort( const tag =
(await simpleGit().tags([`--contains=${commit.hash}`])).all semver.sort(
)[0]!; (await simpleGit().tags([`--contains=${commit.hash}`])).all
)[0]! || "Unreleased";
const currentCommitStack = parsedCommitStacks.find( const currentCommitStack = parsedCommitStacks.find(
(commitStack) => commitStack.version === tag (commitStack) => commitStack.version === tag
) || { ) || {
version: tag || "", version: tag || "Unreleased",
breaking: [], breaking: [],
features: [], features: [],
fixes: [], fixes: [],