diff --git a/src/Commands/Generate.fs b/src/Commands/Generate.fs index 4d6c29c..20e9277 100644 --- a/src/Commands/Generate.fs +++ b/src/Commands/Generate.fs @@ -22,19 +22,27 @@ type GenerateCommand() = // do! Verify.options settings changelogInfo let commits = ReleaseContext.getCommits settings changelogInfo - let releaseContext = ReleaseContext.compute settings changelogInfo commits config.CommitParserConfig + + let releaseContext = + ReleaseContext.compute settings changelogInfo commits config.CommitParserConfig match releaseContext with | NoVersionBumpRequired -> Log.success "No version bump required." | BumpRequired bumpInfo -> - let newChangelogContent = Changelog.updateWithNewVersion config.ChangelogGenConfig bumpInfo changelogInfo + let newChangelogContent = + Changelog.updateWithNewVersion + config.ChangelogGenConfig + bumpInfo + changelogInfo if settings.DryRun then Log.info "Dry run enabled, not writing to file." printfn "%s" newChangelogContent else File.WriteAllText(changelogInfo.File.FullName, newChangelogContent) - Log.success ($"Changelog updated with new version {bumpInfo.NewVersion}.") + Log.success ($"Changelog updated with new version:") + // Print to stdout so it can be captured easily by other tools + printfn "%s" (bumpInfo.NewVersion.ToString()) } match res with