用于管理changelog.md文件的命令行界面
changelog-cli的Python项目详细描述
用于管理changelog.md文件的命令行界面。设计 为了便于根据 Keep a Changelog。
安装
使用pipvia安装:
pip install changelog-cli
如何
当您提交一个 影响最终用户如何使用项目,请使用此命令行工具 向变更日志中添加一行。
如果添加了新功能,请使用 changelog new "added feature x"。这将为您的 CHANGELOG.md在### New部分下。
当您准备好发布时,运行changelog release,这将 根据 最后一个版本。例如,您的new更改应该提示 minor (0.X.0)发布。breaks更改将提示 major (X.0.0)version bump和fix或change更改将 提示a patch (0.0.X)。
您可以通过 changelog release --minor使用--patch,--minor或 --major标志。
命令
changelog init->;使用一些基本的 文件。
changelog (new|change|fix|breaks) "<message>"->;在 适当部分
changelog release (--major|minor|patch|suggest)(--yes)->;剪切 为变更日志释放,增加版本。
changelog current->;返回项目的当前版本 基于更改日志
changelog suggest->;返回下一个的建议版本 根据当前记录的更改发布
changelog --version->;获取当前版本的更改日志工具
changelog --help->;显示帮助屏幕
快捷方式
如果您厌倦了为每个命令键入changelog,它可以 也可以通过它的速记cl
示例用法
>>> changelog current 1.4.1 >>> changelog new "add new feature x" >>> changelog suggest 1.5.0 >>> changelog breaks "removing key feature y" >>> cl release Planning on releasing version 2.0.0. Proceed? [y/N]: n >>> cl release --minor >>> cl current 1.5.0
上述结果的更改日志示例
# CHANGELOG All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Changelog](http://keepachangelog.com/). ## Unreleased --- ### New ### Changes ### Fixes ### Breaks ## 1.5.0 - (2017-06-09) --- ### New * add new feature x ### Breaks * remove key feature y ## 1.4.1 - (2017-05-29) --- ### Changes * updating documentation ...