0.0.2-rc8 • Published 5 years ago
cheers-cli v0.0.2-rc8
Cheers
一个用于快速发布版本, 快速生成更新日志的命令行工具
English | 简体中文
安装
- 全局安装
npm install -g cheers-cli
- 本地安装
npm install -D cheers-cli
配置
./package.json
{ "scripts": { "cheers": "cheers" }, "cheers": { "commitLink": "https://github.com/olivewind/cheers/commits/%s", "issueLink": "https://github.com/olivewind/cheers/issues/%s", "dryrun": "on", "preHook": "bash pre.sh", "postHook": "bash post.sh" } }
所有配置
参数 作用 默认值 commitLink commit 链接 无 issueLink issue 链接 无 dryrun 仅生成 changelog 不作其它操作 'off' preRelease 前置钩子 无 postRelease 后置钩子 无 pick 提取哪些类型的 commit 全部即 'fix', 'feat', 'perf', 'docs', 'refactor' dir 输出目录 ./changelogs
dest 输出文件 vversion.md
使用
修改项目 package.json 的 version 为目标版本号
{ "version": "0.0.1" }
在项目根目录下执行命令
npm run cheers
Cheers 做了那些事?
- 根据 package.json 取得所需的元信息(版本,配置等)
- 拿到上一个 tag 至今的所有新 commit
- 根据 AngularJS Git Commit Message Conventions 风格解析
- 生成 changelogs/version.md
- git tag version
- git commit -m 'release version'
- git push origin branch
- git push origin version
Roadmap
- 零依赖
- 业务零侵入
- 支持仓库地址配置
- 支持 dryrun
- 支持 hook
- 插件系统
- 支持其它风格 commit message
- 多语言文档