release-it

🚀 Automate versioning and package publishing
授权协议 MIT License
开发语言 JavaScript
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 越季萌
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Release It! ��

�� Generic CLI tool to automate versioning and package publishing related tasks:

Use release-it for version management and publish to anywhere with its versatile configuration, a powerful pluginsystem, and hooks to execute any command you need to test, build, and/or publish your project.

Action Status

Links

Installation

Although release-it is a generic release tool, installation requires npm. To use release-it, a package.json fileis not required. The recommended way to install release-it also adds basic configuration. Answer one or two questionsand it's ready:

npm init release-it

Alternatively, install it manually, and add the release script to package.json:

npm install --save-dev release-it
{
  "name": "my-package",
  "version": "1.0.0",
  "scripts": {
    "release": "release-it"
  },
  "devDependencies": {
    "release-it": "*"
  }
}

Now you can run npm run release from the command line (any release-it arguments behind the --):

npm run release
npm run release -- minor --ci

Global usage

Use release-it in any (non-npm) project, take it for a test drive, or install it globally:

# Run release-it from anywhere (without installation)
npx release-it

# Install globally and run from anywhere
npm install --global release-it
release-it

Usage

Release a new version:

release-it

You will be prompted to select the new version, and more prompts will follow based on your setup.

Run release-it from the root of the project to prevent potential issues.

Dry Runs

Use --dry-run to show the interactivity and the commands it would execute.

→ See Dry Runs for more details.

To print the next version without releasing anything, add the --release-version flag.

Configuration

Out of the box, release-it has sane defaults, and plenty of options to configure it. Mostprojects use a .release-it.json in the project root, or a release-it property in package.json.

→ See Configuration for more details.

Here's a quick example .release-it.json:

{
  "git": {
    "commitMessage": "chore: release v${version}"
  },
  "github": {
    "release": true
  }
}

Interactive vs. CI mode

By default, release-it is interactive and allows you to confirm each task before execution:

By using the --ci option, the process is fully automated without prompts. The configured tasks will be executed asdemonstrated in the first animation above. On a Continuous Integration (CI) environment, this non-interactive mode isactivated automatically.

Use --only-version to use a prompt only to determine the version, and automate the rest.

Latest version

How does release-it determine the latest version?

  1. For projects with a package.json, its version will be used (see npm to skip this).
  2. Otherwise, release-it uses the latest Git tag to determine which version should be released.
  3. As a last resort, 0.0.0 will be used as the latest version.

Alternatively, a plugin can be used to override this (e.g. to manage a VERSION or composer.json file):

Add the --release-version flag to print the next version without releasing anything.

Git

Git projects are supported well by release-it, automating the tasks to stage, commit, tag and push releases to any Gitremote.

→ See Git for more details.

GitHub Releases

GitHub projects can have releases attached to Git tags, containing release notes and assets. There are two ways to addGitHub releases in your release-it flow:

  1. Automated (requires a GITHUB_TOKEN)
  2. Manual (using the GitHub web interface with pre-populated fields)

→ See GitHub Releases for more details.

GitLab Releases

GitLab projects can have releases attached to Git tags, containing release notes and assets. To automateGitLab releases:

→ See GitLab Releases for more details.

Changelog

By default, release-it generates a changelog, to show and help select a version for the new release. Additionally, thischangelog serves as the release notes for the GitHub or GitLab release.

The default command is based on git log .... This setting (git.changelog) can beoverridden. To further customize the release notes for the GitHub or GitLab release, there's github.releaseNotes orgitlab.releaseNotes. Make sure any of these commands output the changelog to stdout. Plugins are available for:

  • GitHub and GitLab Releases
  • auto-changelog
  • Conventional Changelog
  • Keep A Changelog

→ See Changelog for more details.

Publish to npm

With a package.json in the current directory, release-it will let npm bump the version in package.json (andpackage-lock.json if present), and publish to the npm registry.

→ See Publish to npm for more details.

Manage pre-releases

With release-it, it's easy to create pre-releases: a version of your software that you want to make available, whileit's not in the stable semver range yet. Often "alpha", "beta", and "rc" (release candidate) are used as identifier forpre-releases. An example pre-release version is 2.0.0-beta.0.

→ See Manage pre-releases for more details.

Update or re-run existing releases

Use --no-increment to not increment the last version, but update the last existing tag/version.

This may be helpful in cases where the version was already incremented. Here's a few example scenarios:

  • To update or publish a (draft) GitHub Release for an existing Git tag.
  • Publishing to npm succeeded, but pushing the Git tag to the remote failed. Then userelease-it --no-increment --no-npm to skip the npm publish and try pushing the same Git tag again.

Hooks

Use script hooks to run shell commands at any moment during the release process (such as before:init orafter:release).

The format is [prefix]:[hook] or [prefix]:[plugin]:[hook]:

part value
prefix before or after
plugin version, git, npm, github, gitlab
hook init, bump, release

Use the optional :plugin part in the middle to hook into a life cycle method exactly before or after any plugin.

The core plugins include version, git, npm, github, gitlab.

Note that hooks like after:git:release will not run when either the git push failed, or when it is configured not tobe executed (e.g. git.push: false). See execution order for more details onexecution order of plugin lifecycle methods.

All commands can use configuration variables (like template strings). An array of commands can also be provided, theywill run one after another. Some example release-it configuration:

{
  "hooks": {
    "before:init": ["npm run lint", "npm test"],
    "after:my-plugin:bump": "./bin/my-script.sh",
    "after:bump": "npm run build",
    "after:git:release": "echo After git push, before github release",
    "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
  }
}

The variables can be found in the default configuration. Additionally, the followingvariables are exposed:

version
latestVersion
changelog
name
repo.remote, repo.protocol, repo.host, repo.owner, repo.repository, repo.project

All variables are available in all hooks. The only exception is that the additional variables listed above are not yetavailable in the init hook.

Use --verbose to log the output of the commands.

For the sake of verbosity, the full list of hooks is actually: init, beforeBump, bump, beforeRelease, releaseor afterRelease. However, hooks like before:beforeRelease look weird and are usually not useful in practice.

Plugins

Since v11, release-it can be extended in many, many ways. Here are some plugins:

Plugin Description
@release-it/bumper Read & write the version from/to any file
@release-it/conventional-changelog Provides recommended bump, conventional-changelog, and updates CHANGELOG.md
@release-it/keep-a-changelog Maintain CHANGELOG.md using the Keep a Changelog standards
release-it-lerna-changelog Integrates lerna-changelog into the release-it pipeline
release-it-yarn-workspaces Releases each of your projects configured workspaces
release-it-calver-plugin Enables Calendar Versioning (calver) with release-it
@grupoboticario/news-fragments An easy way to generate your changelog file
@j-ulrich/release-it-regex-bumper Regular expression based version read/write plugin for release-it

Internally, release-it uses its own plugin architecture (for Git, GitHub, GitLab, npm).

→ See all release-it plugins on npm.

→ See plugins for documentation to write plugins.

Distribution repository

Deprecated. Please see distribution repository for more details.

Metrics

Use --disable-metrics to opt-out of sending some anonymous statistical data to Google Analytics. For details, refer tolib/metrics.js. Please consider to not opt-out: more data means more support for future development.

Troubleshooting & debugging

  • With release-it --verbose (or -V), release-it prints the output of every user-defined hook.
  • With release-it -VV, release-it also prints the output of every internal command.
  • Use DEBUG=release-it:* release-it [...] to print configuration and more error details.

Use verbose: 2 in a configuration file to have the equivalent of -VV on the command line.

Use release-it programmatically

While mostly used as a CLI tool, release-it can be used as a dependency to integrate in your own scripts. Seeuse release-it programmatically for example code.

Example projects using release-it

Resources

  • Releasing Updates (React Native) code-push release-react <appName> <platform> [--bundleName <bundleName>] [--deploymentName <deploymentName>] [--description <description>] [--development <development>

  • 1、安装 epel-release # yum install epel-release -y 2、执行 yum repolist 报错(部分主机会报错,大部分正常) [root@Tang-1 ~]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Loading mirr

  • Release版本编辑 本词条缺少 信息栏、 名片图,补充相关内容使词条更完整,还能快速升级,赶紧来 编辑吧! Release Candidate(RC)候选版本,用于指 软件或 操作系统的发布,一般与Debug版本相对应,后者可以调试,包括了每个执行码对应的 源代码信息,而一般过了测试版时期,基本没有什么问题后,会发布几个略微不同的版本,就叫做rc1、rc2,然后从这里面挑选一个作为正式版本。R

  • The latest release of Tapestry, Tapestry 5.0.16 (Release Candidate), is now available. Tapestry 5.0.16 is the release candidate; we encourage users to download this version. In about a month, the Tape

  • The Release schedule is available also as a JSON file. Release Phases There are three phases that a Node.js release can be in: ‘Current’, ‘Active Long Term Support (LTS)’, and ‘Maintenance’. Odd-numbe

  • 原文地址:https://developer.chrome.com/native-client/sdk/release-notes 以下发行说明中的​​日期表示Chrome和NaCl SDK达到金丝雀状态的时间。稳定释放通常是6周后。 Chrome/Pepper 49 从SDK中删除了基于GCC的newlib工具链。这些已被nacl-clang工具链取代,该工具链还生成静态链接的体系结构特定的ne

  • // ReleaseTracer.cpp : コンソール アプリケーション用のエントリ ポイントの定義 // /* Main Function: this programe catches the debug events and output the debug info. this can works even for release version EXE files. Any sugges

  • ls /etc/*release* /etc/redhat-release /etc/system-release /etc/system-release-cpe cat /etc/*release* Red Hat Enterprise Linux Server release 6.4 (Santiago) Red Hat Enterprise Linux Server release 6.4

  • Debug和Release的区别 Debug:调试版本,包括调试信息,所以其容量一般来说比Release大很多,并且不进行任何的优化(优化会使得调试信息复杂化,因为源代码和生成的指令之间关系会更复杂),以便于程序员进行调试。 Debug模式下生成两个文件:除了.exe或者.dll文件外,还有一个.pdb文件,该文件记录了代码中断点等调试信息。 Release:发布版本,不对源代码进行调试,编译时对

  • 背景、netty抛出完整的error信息如下: 2018-02-08 14:30:43.098 [nioEventLoopGroup-5-1] ERROR io.netty.util.ResourceLeakDetector:176 - LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable adva

  •   Debug 通常称为调试版本,它包含调试信息,并且不作任何优化,便于程序员调试程序。 Release 称为发布版本,它往往是进行了各种优化,使得程序在代码大小和运行速度上都是最优的,以便用户很好地使用。  Debug 和 Release 的真正秘密,在于一组编译选项。下面列出了分别针对二者的选项(当然除此之外还有其他一些,如 /Fd /Fo ,但区别并不重要,通常他们也不会引起 Release

  • 具体错误: fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “/usr/local/bin/helm upgrade –install ks-openldap /etc/kubesphere/openldap-ha -f /etc/kubesphere/custom-values-openldap.yaml –set fullname

  • if (msiDb != null) {      System.Runtime.InteropServices.Marshal.FinalReleaseComObject(msiDb);      msiDb =null; } if (pcpDb != null) {      System.Runtime.InteropServices.Marshal.FinalReleaseComObjec

  • 最近用hiernate执行saveOrUpdate的时候,报错了。错误信息如下 2018-11-12 13:55:32,265 [WARN ] [http-bio-8080-exec-9] org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 1062, SQLState: 23000 2018-11-12 13:55:32,2

  • 看不出[self.xxx release]和[xxx release]的用法有什么本质的差别。self.xxx多一个步骤:通过getter得到成员变量。而通常情况下,getter也只是直接返回相应的对象。这点楼主自己也说明了。 建议不要在这个问题上太过纠结,遵守常规约定即可。 1. 一般情况下,对于类型是对象的成员变量,如果设置了对应的@property,就用以下这种格式释放:     1.  

  • 原文链接:http://blog.csdn.net/ring0hx/article/details/7946397 对于 CCObject* obj = new CCObject(),正确的释放方式: 应该是 obj->release() 而不是 delete obj;(具体可以参看 2dx 源码) cocos2dx 的内存管理移植自 oc, 对于没有接触过 oc 的 C++ 开发人员来说是挺迷惑

  • Surviving the Release Version Introduction OK, your program works. You've tested everything in sight. It's time to ship it. So you make a release version. And the world crumbles to dust. You get memor

  • 我遇到的问题是:调试输出TRACE注释就好了 下面网上找的,谢谢提供:  1.   注意变量的初始化,尤其是指针变量,数组变量的初始化(很大的情况下另作考虑了)。        2.   自定义消息及其他声明的标准写法        3.   使用调试宏时使用后最好注释掉        4.   尽量使用try   -   catch(...)        5.   尽量使用模块,不但表达清楚而

  • Release 下想调试代码只需要修改一下设置: 右键当前工程, 选择properties 选择 All Configurations C++>General->Debug Information Format->Program Database (/Zi) C++>Optimization->Optimization->Disabled (/Od) Linker->Debugging->Gene

  •   Release procedures can be defined for the following documents: Purchase Requisition The external purchasing documents purchase order (PO), contract, scheduling agreement, request for quotation (RFQ)

  • 1、如何判断生成的可执行文件是debug版还是release版? linux下用file xxx   2、如何生成debug版或release版? 前提: 在生成Qt库时(./configure)已经配置为  + -debug-and-release 如果配置为./configure -release,则只能生成release版 ( 附简单配置说明如下 -release ........... 调

  • 以下包括了部分网上收集的,以及qt帮助里的内容(Deploying an Application on Qt/Windows) 部署发布QT程序有两种方法: 第一种,静态编译,可生成单一的可执行文件。 第二种,动态编译,需同时附上需要的dll文件。 一、静态编译 1 编译QT。 要静态编译,首先要求QT是静态编译过的。在QT目录下执行: configure.exe -static -release

  •         一直以来,都在不断的摸索,不断地尝试着,想要在技术上,在知识上,有一个长足的进步,能有一个能够察觉的飞跃。        希望能一直保留一些,激情,能够在解决一个难题的时候,兴奋得手舞足蹈,能够为了一个题目,一个想法,耗上一个晚上。        希望能够,坚持写下去。        能够成为,不断鼓励自己进步,能够细细回味的地方!        This is the virgi

 相关资料
  • 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

  • IT++是一个数学,信号处理和通信类功能的C++库。它的主要用途是模拟通信系统,并进行研究相关领域的通信。它综合了Matlab的功能和C的速度,适合于信号处理等领域。 功能和特点 模板阵列和堆叠的集装箱类 命令和文件的论点分析器 模板向量和矩阵类 稀疏向量和矩阵类 载体功能和矩阵类 矩阵分解等特征 求解线性方程组 随机数代 二进制和伽罗瓦类型(标量,矢量和矩阵) 一体化的一维职能 无条件的非线性优

  • 8.0.0 Released on 5th of August, 2020Major changes This version introduces a completely new architecture for row and column management - index mapper, which is responsible for the storage and manageme

  • 0.24.4 (2014-08-09) pem file is used by mockserver and required by scrapy bench (commit 5eddc68) scrapy bench needs scrapy.tests* (commit d6cb999) 0.24.3 (2014-08-09) no need to waste travis-ci time o

  • v10.0.0 This is the first development release for the Jewel cycle. Notable Changes build: cmake tweaks (pr#6254, John Spray) build: more CMake package check fixes (pr#6108, Daniel Gryniewicz) ceph-dis

  • Pure Release 是用于 Bower 包的 Pure 目录。它是一套小的 CSS 模块,你可以用在每个 Web 工程上。