A script for reverting change log to set version. Only tested when using standard-version
to generate change log.
Revert CHANGELOG to the set version. Only test CHANGELOG.md file generated by standard-version
.
npm install -D @z1c1/revert-changelog
config npm scripts:
{
"scripts": {
"revert-changelog": "revert-changelog '${version}' '${filename}'"
}
}
npx @z1c1/revert-changelog "$version" "$filename"
-
version (Optional): The version you want to revert to. Content before and include the set version in changelog file will be simply cleared. If not set, latest version in changelog file will be reverted.
-
filename (Optional): The filename of CHANGELOG. Default value is 'CHANGELOG.md'.
See the change log.