Skip to content

Latest commit

 

History

History
106 lines (72 loc) · 2.91 KB

README-zh-CN.md

File metadata and controls

106 lines (72 loc) · 2.91 KB

中文简体 | English

Build Status Build Status Go Report Card Latest Version 996.icu Repo Size

whatchanged

一个优雅的变更日志生成器,只需遵循 Conventional Commits 规范,即可生成一个漂亮的,工整的变更日志。

致力于优雅/简单/高效/可扩展

在线感受魔法

特性:

使用

$ whatchanged --help

安装

  1. Cask

    cask install github.com/release-lab/whatchanged
  2. Shell (Mac/Linux)

    curl -fsSL https://github.com/release-lab/install/raw/v1/install.sh | bash -s -- -r=release-lab/whatchanged
  3. PowerShell (Windows):

    $r="release-lab/whatchanged";iwr https://github.com/release-lab/install/raw/v1/install.ps1 -useb | iex
  4. Github Release Page 下载 (全平台支持)

    下载可执行文件,并且把它加入到$PATH 环境变量中

  5. 使用 Golang 从源码中构建并安装 (全平台支持)

    go install github.com/release-lab/whatchanged/cmd/whatchanged

作为库使用

# 安装包
go get -v -u github.com/release-lab/whatchanged
package main

import (
   "context"
   "bytes"

   "github.com/release-lab/whatchanged"
)

func main() {
   output := bytes.NewBuffer([]byte{})

   option := whatchanged.Options{
      Version: []string{"HEAD~"}
   }

   err := whatchanged.Generate(context.Background(), "/path/to/git/project", output, &option)

   if err!=nil{
      panic(err)
   }

   println(output)
}

常见问题

  1. 它是如何工作的?
  2. 如何自定义生成的模版?

开源许可

The Anti-996 License