manual-git-changelog
A simple tool for appending to a changelog based on git commits and tags.
Last updated 2 years ago by rubensworks .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install manual-git-changelog 
SYNC missed versions from official npm registry.

Manual Git Changelog

Build Status Coverage Status Mutation testing badge npm version Greenkeeper badge

A simple tool for appending to a changelog based on git commits and tags.

This is an alternative to tools such as conventional-changelog for projects that don't follow a specific commit convention, but wanting to automate your CHANGELOG.md generation upon each release.

This tool does this by automating the creation of CHANGELOG.md as much as possible, but allowing you to manually polish the file before committing.

This tool assumes that you use semantic versioned git tags (like v1.2.3 and v2.0.1).

Some examples of changelogs that were generated with this tool:

Installation

It is advised to install this tool as a dev dependency:

$ yarn add --dev manual-git-changelog

Usage

After installing, the manual-git-changelog script will become available. It can be used to do three things:

  1. Initialize a new CHANGELOG.md file
  2. Add the changelog for an update while npm version is running.
  3. Manually add the changelog for a particular version to CHANGELOG.md.

These usages will be explained hereafter.

Initialize

By running manual-git-changelog init, you can create a new CHANGELOG.md file based on your current version and git commits.

This command will fail when CHANGELOG.md already exists.

Automatic version appending

If you like more automation in your release process, then you can hook this tool into npm version.

You can do this by adding the following script to your package.json file:

{
  "scripts": {
    "version": "manual-git-changelog onversion"
  }
}

This will make it so that each time you call npm version, the changelog will automatically be updated to the new version.

Note that this will temporarily pause the process to allow you to manually polish the changelog file, to allow you to categorize the commits. This pausing happens when the following is printed to the console

Manually edit CHANGELOG.md, press any key to finalize...

Once you have edited CHANGELOG.md, and are satisfied with its structure, go back to your console, press any key to continue. The tool will automatically stage CHANGELOG.md so that it becomes part of the version bump commit as done by npm version.

Manual version appending

As an alternative to automatic changelog updates during npm version, you can manually trigger a version log to be added to be added to your changelog. You can call the command, with a certain version to set as new version (ex: v1.2.3) as follows:

$ manual-git-changelog v1.2.3

The previous available version (for example v1.2.2) will be automatically detected from the git tags. As such, this script assumes that v1.2.3 has not been tagged yet.

If this version would already be tagged, then this script also allows you to define a custom version range that does not try to infer the previous version from the git tags:

$ manual-git-changelog v1.2.2 v1.2.3

License

This software is written by Ruben Taelman.

This code is released under the MIT license.

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (5)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |