Skip to content

A PowerShell module for reading and manipulating changelog files in Keep a Changelog 1.0.0 format.

License

Notifications You must be signed in to change notification settings

natescherer/ChangelogManagement

Repository files navigation

ChangelogManagement

Tests Windows PowerShell Tests Windows Pwsh Tests Linux Tests macOS codecov

All Contributors

ChangelogManagement is a PowerShell module for reading and manipulating changelog files in Keep a Changelog 1.0.0 format.

The primary feature is automatic updating of changelogs at release time in a CI/CD workflow via Update-Changelog.

Other features include:

  • Creating new changelog files via New-Changelog
  • Adding data to changelog files via Add-ChangelogData
  • Getting changelog contents (parsed into a PowerShell object) via Get-ChangelogData
  • Converting changelogs into other formats via ConvertFrom-Changelog

Getting Started

ChangelogManagement is designed to be cross-platform and fully compatible with Windows PowerShell 5.1 and PowerShell 7+ on Windows/Linux/macOS.

Prerequisites

No prerequisites are required beyond having PowerShell installed.

Installing

ChangelogManagement is listed in the PowerShell Gallery here, which means you can install on any internet-connected computer running PowerShell 5.1+ by running this command:

Install-Module -Name ChangelogManagement

Usage

Examples

LinkPattern   = @{
    FirstRelease  = "https://github.com/testuser/testrepo/tree/v{CUR}"
    NormalRelease = "https://github.com/testuser/testrepo/compare/v{PREV}..v{CUR}"
    Unreleased    = "https://github.com/testuser/testrepo/compare/v{CUR}..HEAD"
}
Update-Changelog -ReleaseVersion 1.1.1 -LinkMode Automatic -LinkPattern $LinkPattern
  • Does not generate output, but:
    • Takes all Unreleased changes in .\CHANGELOG.md and adds them to a new release tagged with ReleaseVersion and today's date.
    • Updates links according to LinkPattern.
    • Creates a new, blank Unreleased section.
New-Changelog
  • Does not generate output, but creates a new changelog at .\CHANGELOG.md.
Add-ChangelogData -Type "Added" -Data "Spanish language translation"
  • Does not generate output, but adds a new Added change into changelog at .\CHANGELOG.md.
Get-ChangelogData
  • Returns an object containing Header, Unreleased, Released, Footer, and LastVersion properties.
ConvertFrom-Changelog -Path .\CHANGELOG.md -Format Release -OutputPath docs\CHANGELOG.md
  • Does not generate output, but creates a file at docs\CHANGELOG.md that is the same as the input with the Unreleased section removed.

Documentation

For detailed documentation, click here on GitHub, see the docs folder in a release, or run Get-Help for the individual function in PowerShell.

Questions/Comments

If you have questions, comments, etc, please enter a GitHub Issue with the "question" tag.

Contributing/Bug Reporting

Contributions and bug reports are gladly accepted! Please see CONTRIBUTING.md for details.

Building

Building is unnecessary, per se. The provided build YAML generates documentation files and metadata, then does the actual releasing and publishing. If modifying locally, you can simply use the updated .psd1/.psm1 files without running a build process.

Contributors

Nate Scherer
Nate Scherer

💻 📖 🚇
James Charlesworth
James Charlesworth

💻
Gael
Gael

💻
Johan Ljunggren
Johan Ljunggren

💻

This project follows the all-contributors specification. Contributions of any kind are welcome!

License

This project is licensed under The MIT License - see LICENSE for details.

Acknowledgements

Hosted By: Cloudsmith

Package repository hosting is graciously provided by Cloudsmith.

About

A PowerShell module for reading and manipulating changelog files in Keep a Changelog 1.0.0 format.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published