@activeprospect/cut-release 中文文档教程

发布于 3年前 浏览 14 项目主页 更新于 3年前

cut-release

一个命令行工具,可帮助您更快地发布 NPM。

What it does

  • If run in a git repo, ensures that the local repo has no uncommitted changes, that the local branch is tracking a remote branch, that the remote branch is not ahead of the local branch, and that the git tag doesn't already exist
  • runs npm version with the version you specify. If run in a git repo, it will also create a version commit and tag, just like what npm version does.
  • pushes commits and tags to the remote repo
  • runs npm publish and tags the published module

Install

npm install -g @activeprospect/cut-release

Usage

这应该在合并功能分支后从存储库的 master 分支运行。

要查看使用文档,请运行 cut-release --help

$ cut-release --help

Usage: cut-release [increment] [options]

Supported increments: <semver>, patch, minor, major, prepatch, preminor, premajor, prerelease

Options:
  -y, --yes                   Skip confirmation when present  [boolean] [required] [default: false]
  -t, --tag                   NPM tag for the release (i.e. latest, next)  [string]
  -p, --preid                 NPM prerelease identifier (i.e. rc, alpha, beta)  [string]
  -d, --dry-run               Print commands to be run, but don't run them  [boolean] [default: false]
  -m, --message               Version commit message - the %s variable will be replaced with the version  [string]
  --otp, --one-time-password  NPM one time password. Required if NPM 2FA is enabled  [string]
  -h, --help                  Show help  [boolean]
  -v, --version               Show version number  [boolean]

Thanks

这是https://github.com/bjoerge/cut-release。 特别感谢原作者。

cut-release

A command line tool that helps you make faster NPM releases.

What it does

  • If run in a git repo, ensures that the local repo has no uncommitted changes, that the local branch is tracking a remote branch, that the remote branch is not ahead of the local branch, and that the git tag doesn't already exist
  • runs npm version with the version you specify. If run in a git repo, it will also create a version commit and tag, just like what npm version does.
  • pushes commits and tags to the remote repo
  • runs npm publish and tags the published module

Install

npm install -g @activeprospect/cut-release

Usage

This should be run from the master branch of your repo after you merge your feature branch.

To see usage documentation, run cut-release --help:

$ cut-release --help

Usage: cut-release [increment] [options]

Supported increments: <semver>, patch, minor, major, prepatch, preminor, premajor, prerelease

Options:
  -y, --yes                   Skip confirmation when present  [boolean] [required] [default: false]
  -t, --tag                   NPM tag for the release (i.e. latest, next)  [string]
  -p, --preid                 NPM prerelease identifier (i.e. rc, alpha, beta)  [string]
  -d, --dry-run               Print commands to be run, but don't run them  [boolean] [default: false]
  -m, --message               Version commit message - the %s variable will be replaced with the version  [string]
  --otp, --one-time-password  NPM one time password. Required if NPM 2FA is enabled  [string]
  -h, --help                  Show help  [boolean]
  -v, --version               Show version number  [boolean]

Thanks

This is a fork of https://github.com/bjoerge/cut-release. Special thanks to the original author.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文