Vercel Release

只需一条命令就能生成变更日志。「Generate changelogs with a single command」

  • 所有者: vercel/release
  • 平台: Linux, Mac, Windows
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Build Status
Join the community on Spectrum

When run, this command line interface automatically generates a new GitHub Release and populates it with the changes (commits) made since the last release.

Usage

Firstly, install the package from npm (you'll need at least Node.js 7.6.0):

npm install -g release

Alternatively, you can use Yarn to install it:

yarn global add release

Once that's done, you can run this command inside your project's directory:

release <type>

As you can see, a <type> argument can be passed. If you leave it out, a GitHub Release will be created from the most recent commit and tag.

According to the SemVer spec, the argument can have one of these values:

  • major: Incompatible API changes were introduced
  • minor: Functionality was added in a backwards-compatible manner
  • patch: Backwards-compatible bug fixes were applied

In addition to those values, we also support creating pre-releases like 3.0.0-canary.1:

release pre

You can also apply a custom suffix in place of "canary" like this:

release pre <suffix>

Assuming that you provide "beta" as the <suffix> your release will then be 3.0.0-beta.1 – and so on...

Options

The following command will show you a list of all available options:

release help

Pre-Defining Types

If you want to automate release even further, specify the change type of your commits by adding it to the title or description within parenthesis:

Error logging works now (patch)

Assuming that you've defined it for a certain commit, release won't ask you to set a type for it manually. This will make the process of creating a release even faster.

To pre-define that a commit should be excluded from the list, you can use this keyword:

This is a commit message (ignore)

Custom Hook

Sometimes you might want to filter the information that gets inserted into new releases by adding an intro text, replacing certain data or just changing the order of the changes.

With a custom hook, the examples above (and many more) are very easy to accomplish:

By default, release will look for a file named release.js in the root directory of your project. This file should export a function with two parameters and always return a String (the final release):

module.exports = async (markdown, metaData) => {
  // Use the available data to create a custom release
  return markdown
}

In the example above, markdown contains the release as a String (if you just want to replace something). In addition, metaData contains these properties:

主要指標

概覽
名稱與所有者vercel/release
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台Linux, Mac, Windows
許可證MIT License
所有者活动
創建於2016-12-22 08:58:33
推送於2024-06-08 20:31:42
最后一次提交2024-06-08 22:31:42
發布數68
最新版本名稱6.3.1 (發布於 )
第一版名稱1.0.0 (發布於 )
用户参与
星數3.6k
關注者數82
派生數115
提交數403
已啟用問題?
問題數118
打開的問題數36
拉請求數45
打開的拉請求數10
關閉的拉請求數24
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?