diff --git a/.rczrc.json b/.rczrc.json index 3925ad8..d237372 100644 --- a/.rczrc.json +++ b/.rczrc.json @@ -1,3 +1,4 @@ { - "scopes": ["commands", "changelog", "readme", "release", "config"] + "scopes": ["commands", "changelog", "readme", "release", "config"], + "autoSignReleases": true } diff --git a/src/index.ts b/src/index.ts index 95e69b6..c24f332 100644 --- a/src/index.ts +++ b/src/index.ts @@ -240,9 +240,14 @@ program .description("Outputs a markdown formatted changelog") .option("--show-hashes", "show first 9 characters of commit hashes") .option("--last-only", "display only latest release changes") + .option( + "--unreleased-as ", + "show unreleased changes as different version" + ) .action(async (options) => { const showHashes = options.showHashes ? true : false; const lastOnly = options.lastOnly ? true : false; + const unreleased = options.unreleasedAs || "Unreleased"; if ((await simpleGit().tags()).all.length === 0) { return console.log( @@ -261,12 +266,12 @@ program const tag = semver.sort( (await simpleGit().tags([`--contains=${commit.hash}`])).all - )[0]! || "Unreleased"; + )[0]! || unreleased; const currentCommitStack = parsedCommitStacks.find( (commitStack) => commitStack.version === tag ) || { - version: tag || "Unreleased", + version: tag || unreleased, breaking: [], features: [], fixes: [],