resource-types/keep-a-changelog

Changelog resource following Keep a Changelog format.

Methods

(inner) getVersion(resource, cb)

Get version value from the changelog's latest release. It's common for the latest release of a changelog to be 'Unreleased', in order to indicate that it's the one currently in progress. Hence the version is resolved in this order: 1. when latest release has a version number, use that version 2. when latest release is 'Unreleased' (version is undefined after parsing), use the previous release's version 3. otherwise default to '0.0.0'
Source:
Parameters:
Name Type Description
resource Object resource configuration
Name Type Description
path String path to the changelog file
cb function standard cb(err, result) callback, result is the version value

(inner) setPostReleaseVersion(version, resource, opts, cb)

Add a new Unreleased section to the top of the changelog. The version value is not written to the changelog, Unreleased section represents the next pre-release version instead.
Source:
Parameters:
Name Type Description
version String post-release version value, unused
resource Object resource configuration
Name Type Description
path String path to the changelog file
opts Object optional settings
Name Type Attributes Description
dryRun Boolean <optional>
when true, changelog file won't be modified
tagFormat String SCM tag format used in release links, e.g. v{version}
cb function standard cb(err, result) callback

(inner) setReleaseVersion(version, resource, opts, cb)

Set release version on the latest release within the changelog, with date set to current date.
Source:
Parameters:
Name Type Description
version String version value to set
resource Object resource configuration
Name Type Description
path String path to the changelog file
opts Object optional settings
Name Type Attributes Description
dryRun Boolean <optional>
when true, changelog file won't be modified
tagFormat String SCM tag format used in release links, e.g. v{version}
cb function standard cb(err, result) callback