#changelog #version #merge #stable #combine #pre-release #information

app rclog

A tool that combines changelogs of pre-release versions into the more stable version and pulls out information for a specific version

9 releases

0.1.3 Feb 2, 2024
0.1.3-alpha.1 Jan 18, 2024
0.1.2 Jan 8, 2024
0.1.1 Jan 8, 2024
0.1.1-alpha.1 Jan 4, 2024

#201 in Cargo plugins

Download history 31/week @ 2024-07-23 13/week @ 2024-07-30 2/week @ 2024-09-17 33/week @ 2024-09-24

130 downloads per month

Custom license

14KB
282 lines

Ribir Changelog

Ribir Changelog is a tool that combines changelogs of pre-release versions into the more stable version and pulls out information for a specific version.

This tool helps with two main tasks for Ribir changelog management:

  1. It automatically combines changelogs from multiple pre-release versions into the next version. For example, it can merge all alpha version changelogs into the beta version, and all beta version changelogs into the stable version.
  2. It can pull out the details of a specific version to help create a release note for that version.

Important

This tool works with changelogs in markdown format. It expects each version to be a second-level heading. If you're using the keepachangelog format for your changelog, this tool will work perfectly.

Installation

cargo install rclog

How to Use

To pull out the changelog from a specific version:

rclog -t 0.1.0 -p ./CHANGELOG.md extract

To merge all pre-release versions into the more stable version:

rclog -t 0.1.0 -p ./CHANGELOG.md merge

Run rclog --help for more information.

Use in GitHub Action

This project also provides a reusable GitHub workflow to help the Rust project in Github to release the version. See release-version.yml to see how it works.

To publish a new version to crates.io you need to set your publish secret token of crates.io in your repository. This action will use ${{ secrets.CRATE_RELEASE_TOKEN }} to access the token.

To push the release commit and tag to your repository, you need to set your deploy key in your repository. This action will use ${{ secrets.DEPLOY_KEY }} to access the key.

This workflow is based on cargo-release and rclog.

If you want to merge changelogs from all pre-release versions into the release version, you need to configure pre-release-hook for cargo-release in your project's Cargo.toml or release.toml with this content:

pre-release-hook = ["./rclog_hook.sh"]

And the rclog_hook.sh should be like this:

#!/bin/bash

if [ "$MERGE_CHANGELOG" = true ]; then
  echo "$(rclog -t $NEW_VERSION -p ./CHANGELOG.md merge)" >| ./CHANGELOG.md
fi

Dependencies

~9MB
~176K SLoC