cheers-cli

0.0.2-rc8 • Public • Published

Cheers

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

cheers NPM downloads

English | 简体中文

安装

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

配置

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

    参数 作用 默认值
    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

  • 零依赖
  • 业务零侵入
  • 支持仓库地址配置
  • 支持 dryrun
  • 支持 hook
  • 插件系统
  • 支持其它风格 commit message
  • 多语言文档

Package Sidebar

Install

npm i cheers-cli

Weekly Downloads

4

Version

0.0.2-rc8

License

MIT

Unpacked Size

12.3 kB

Total Files

10

Last publish

Collaborators

  • olivewind