change 0.0.8 change: ^0.0.8 copied to clipboard
A Changelog manipulation library. Read/modify/write your CHANGELOG.md. Inspired by keepachangelog.com.
Changelog manipulation tool written in Dart.
Features #
- Supports basic features of Markdown such as bold, italic, links, etc.
- Automatic diff links generation.
Limitations #
- Works with changelogs following keepachangelog format only.
- Complex Markdown (e.g. inline HTML) will probably not work.
Installation #
pub global activate change
Usage #
Adding entries to Unreleased section #
To add a change entry to the Unreleased section, run the following command change <type> <entry>
.
<type>
is one of the following:added
,changed
,deprecated
,removed
,fixed
,security
.<entry>
is an arbitrary line of markdown.
Example
By running these commands
change added "New *cool* feature"
change changed "Renamed foo to [bar](https://example.com/bar)"
you create two entries in the CHANGELOG:
## Unreleased
### Added
- New *cool* feature
### Changed
- Renamed foo to [bar](https://example.com/bar)
Releasing unreleased changes #
To release all unreleased changes under a new version, run
change release <version> -l <diff_link> -d <date>
<version>
is the version for the new release.- optional
<date
is the release date. Default is today. - optional
<diff_link>
is the diff link template.
Example
CHANGELOG before:
## Unreleased
### Added
- New *cool* feature
### Changed
- Renamed foo to [bar](https://example.com/bar)
release command:
change release 0.1.0 -l "https://github.com/example/project/compare/%from%...%to%" -d "2020-06-07"
CHANGELOG after:
## Unreleased
## [0.1.0] - 2020-06-07
### Added
- New *cool* feature
### Changed
- Renamed foo to [bar](https://example.com/bar)
[Unreleased]: https://github.com/example/project/compare/0.1.0...HEAD
Printing a released version #
Suitable for use in e-mails or Git commit messages.
Example
By running this command for the example CHANGELOG
change print 0.1.0
It outputs:
### Added
- New *cool* feature
### Changed
- Renamed foo to [bar](https://example.com/bar)
It will print the diff link as well, when a previous release exists.
How to use as a Git commit message
You can create a signed-off release commit including changes for a specific release like this:
git commit -m "Release version 0.1.0
$(change print 0.1.0)" --signoff