1.0.7 • Published 2 years ago

@codedependant/multi-release v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

multi release

Cli wrapper for Semantic Release which allows forwarding additional global options. The primary target case is for managing the release process of multi / mono repos

Installation

$ npm install @codedependant/multi-release --save-dev

Expose as an npm script called release for consistency.

// package.json
{
  "name": "my-mono-repo"
, "version": "0.0.0"
, "scripts": {
    "release": "multi-release"
 }
}

Release Configuration

// package.json
{
  "name": "my-mono-repo"
, "version": "0.0.0"
, "workspaces": ["packages/*", "services/my-service"]
, "scripts": {
    "release": "multi-release"
 }
, "release": {
    "branches": ["master", "next"]
  , "extends": "@internal/my-release-config"
  , ...
  }
}

Command Line Options

The following flags are passed specifically to the multi-release handler prior to execution.

FlagTypeDescriptionDefault
--sequentialBooleanAvoid concurrent initialization collisions by running seriallyfalse
--debugBooleanOutput debugging informationfalse
--currentBooleanApply commit filtering to current branch onlyfalse
--branchesBooleanThe branches on which releases should happen
--sequentialBooleanRun releases sequentially rather than concurrentlyfalse
--dry-runBooleanRuns all releases in dry run modefalse
--ciBooleanForce semantic-release to run as if it were in a CI environment

Any and all command line options will be injected as global options to plugins through the plugin context key options. Additionally, the directory the command was executed from will be injected as root. This is done to compensate for the fact that semantic release sets cwd to the directory of the package being released during execution.

Authors