Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cheers-cli

olivewind43MIT0.0.2-rc8

A cli for quickly generating change logs

cli, angular, commit, change logs, release

readme

Cheers

一个用于快速发布版本, 快速生成更新日志的命令行工具

cheers NPM downloads

English | 简体中文

安装

  1. 全局安装
     npm install -g cheers-cli
  2. 本地安装

     npm install -D cheers-cli

    配置

  3. ./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"
       }
     }
  4. 所有配置

    | 参数 | 作用 | 默认值 | | --- | --- | --- | | commitLink | commit 链接 | 无 | issueLink | issue 链接 | 无 | dryrun | 仅生成 changelog 不作其它操作 | 'off' | preRelease | 前置钩子 | 无 | postRelease | 后置钩子 | 无 | pick | 提取哪些类型的 commit | 全部即 ['fix', 'feat', 'perf', 'docs', 'refactor'] | dir | 输出目录 | ./changelogs | dest | 输出文件 | v[version].md

使用

  1. 修改项目 package.jsonversion 为目标版本号

     {
       "version": "0.0.1"
     }
  2. 在项目根目录下执行命令

     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

  • <input checked="" disabled="" type="checkbox"> 零依赖
  • <input checked="" disabled="" type="checkbox"> 业务零侵入
  • <input checked="" disabled="" type="checkbox"> 支持仓库地址配置
  • <input checked="" disabled="" type="checkbox"> 支持 dryrun
  • <input checked="" disabled="" type="checkbox"> 支持 hook
  • <input disabled="" type="checkbox"> 插件系统
  • <input disabled="" type="checkbox"> 支持其它风格 commit message
  • <input disabled="" type="checkbox"> 多语言文档