Everyone who maintains a Dart package has to maintain the changelog and release updates once in a while. It can become cumbersome to keep the pubspec version and the changelog in sync manually. These two small tools can make release process fun.
pub global activate change
pub global activate pubspec_version
- change is a changelog manipulation tool. It can add entries and generate release sections with diff links and dates.
- pubspec_version can bump the current package version. It is smart enough to understand breaking, major, minor, patch, and build versions.
Create a shell script with the following code:
#!/usr/bin/env bash
change release $(pubver bump "$1") -l "https://github.com/name/project/compare/%from%...%to%"
and put it somwhere handy, e.g. in ci/release.sh
. Replace the name
and project
in the link, but keep the %%
placeholders.
change added "New *cool* feature"
- adds a new entry to te Unreleased section of the changelog./ci/release.sh minor
- bumps theminor
version inpubspec.yaml
and creates a new release section in the changelog
For the complete feature list, see change and pubspec_version.