2.2.0 • Published 7 years ago

@semantic-release/exec v2.2.0

Weekly downloads
62,441
License
MIT
Repository
github
Last release
7 years ago

@semantic-release/exec

Set of semantic-release plugins to execute custom shell commands.

Travis Codecov Greenkeeper badge

npm latest version npm next version

verifyConditions

Execute a shell command to verify if the release should happen.

Command propertyDescription
exit code0 if the verification is successful, or any other exit code otherwise.
stdoutWrite only the reason for the verification to fail.
stderrCan be used for logging.

analyzeCommits

Execute a shell command to determine the type release.

Command propertyDescription
exit codeAny non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdoutOnly the release type (major, minor or patch etc..) can be written to stdout. If no release has to be done the command must not write to stdout.
stderrCan be used for logging.

verifyRelease

Execute a shell command to verifying a release that was determined before and is about to be published.

Command propertyDescription
exit code0 if the verification is successful, or any other exit code otherwise.
stdoutOnly the reason for the verification to fail can be written to stdout.
stderrCan be used for logging.

generateNotes

Execute a shell command to generate the release note.

Command propertyDescription
exit codeAny non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdoutOnly the release note must be written to stdout.
stderrCan be used for logging.

prepare

Execute a shell command to prepare the release.

Command propertyDescription
exit codeAny non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdoutCan be used for logging.
stderrCan be used for logging.

publish

Execute a shell command to publish the release.

Command propertyDescription
exit codeAny non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdoutOnly the release information must be written to stdout as parseable JSON (for example {"name": "Release name", "url": "http://url/release/1.0.0"}).
stderrCan be used for logging.

success

Execute a shell command to notify of a successful release.

Command propertyDescription
exit codeAny non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdoutCan be used for logging.
stderrCan be used for logging.

fail

Execute a shell command to notify of a failed release.

Command propertyDescription
exit codeAny non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdoutCan be used for logging.
stderrCan be used for logging.

Configuration

Options

OptionsDescription
cmdThe shell command to execute. See cmd.

cmd

The shell command is generated with Lodash template. All the objets passed to the semantic-release plugins are available as template options.

cmd examples
{
  "release": {
    "publish": [
      {
        "path": "@semantic-release/exec",
        "cmd": "./publish.sh ${nextRelease.version} ${options.branch} ${commits.length} ${Date.now()}",
      },
      "@semantic-release/npm",
      "@semantic-release/github"
    ]
  }
}

This will execute the shell command ./publish.sh 1.0.0 master 3 870668040000 (for the release of version 1.0.0 from branch master with 3 commits on August 4th, 1997 at 2:14 AM).

Usage

Options can be set within the plugin definition in the semantic-release configuration file:

{
  "release": {
    "verifyConditions": [
      "@semantic-release/npm",
      {
        "path": "@semantic-release/exec",
        "cmd": "./verify.sh",
      }
    ],
    "publish": [
      "@semantic-release/npm",
      {
        "path": "@semantic-release/exec",
        "cmd": "./publish.sh ${nextRelease.version}",
      },
      "@semantic-release/github"
    ]
  }
}
@tonomy/tonomy-id-test@joelcox22/boilerplate@joelcox22/boilerplate-cdk@html-validate/semantic-releaseux-lib-testuser-friendly-time@infinitebrahmanuniverse/nolb-_semacitymapjob-web-app@everything-registry/sub-chunk-818@healform/liquidweather-extension-axewp-releasestorydocker-utilities@digitalroute/semantic-release-config@droplt/semantic-release-config@developer_impetus/typegen1@bluebase/code-standardsjenkinesjupyter-jacdac@ng-easy/buildersux-friendly-time@koyfin/message-busvelqui@escape.tech/escape-js@anycli/semantic-release@anolilab/semantic-release-preset@affinidi/ui-core@alexarts74/package-upload-wa-map@alorel-personal/semantic-release-test@beecode/msh-config@bjoluc/semantic-release-config-poetry@blerpapp/semantic-release-config-serverless@catalystsquad/release-config-composite-actions@catalystsquad/release-config-helm@catalystsquad/release-config-javascript-actions@catalystsquad/release-config-npm-no-publish@catalystsquad/release-config-template@carbonaut/release-docs@cihelper/preset-semanticrelease-githubaction@cihelper/preset-semanticrelease-poetry@cihelper/semanticrelease-preset-generic@cihelper/semanticrelease-preset-githubaction@cihelper/semanticrelease-preset-goreleaser@cihelper/semanticrelease-preset-npm@clempat/semantic-release@hojerst/semantic-release-configunpinned@fcsukltd/config@dvhb/oclif__semantic-release@dword-design/base-config-app@dword-design/base-config-cli@dword-design/base-config-web-extension@gruzf/numen-semantic@halospv3/hce.shared-config@hdnet/semantic-release-config@hao.yu/test-amplitude-react-native@html-validate/semantic-release-config@elliemae/pui-cli@etclabscore/signatory@esthetic/wp-release@futureverse/nx-semantic-release-sync@gliech/semantic-release-config-github-ansible-role@goestav/nx-semantic-release@kuritkaj/ktools@labshare/semantic-release-config@khulnasoft-opensource/release@khulnasoft-opensource/semantic-release-conventional-config@lomray/microservice-config@interaktiv/dia-scripts@limetech/semantic-release-laravel@limetech/semantic-release-lime-buildtools@limetech/semantic-release-lime-poetry@linx-digital/semantic-release-npm-github-config@maggioli-rd/semantic-release-base@myparcel/semantic-release-config@master/cli@netly/semantic-release-config@ngx-library/infrastructure@exsoinn/node-js-ci-cd@edgelogistics/semantic-release@medijobs/release@mike-north/js-lib-semantic-release-config@mike-works/workshop-semantic-release-config@ivangabriele/semantic-release-config-base-yarn@ivangabriele/semantic-release-config-dist@ivangabriele/semantic-release-config-dist-yarn@ivangabriele/semantic-release-config-monorepo@jojomatik/nuxt-bundle@jneander/semantic-release-config@impetus-bet/apollo-types1@impetus-bet/typegen@jcoreio/toolchain-aws-lambda@hexonet/semantic-release-github-whmcsbase-config@dxcli/dev-semantic-release@dxcli/semantic-release@ogdev/release@ruscon/nx-semantic-release-pnpm@saithodev/semantic-release-sharedconf-npm@qiwi/semrel-preset
6.0.3

4 years ago

6.0.2

4 years ago

6.0.1

4 years ago

6.0.0

4 years ago

5.0.0

5 years ago

4.0.0

6 years ago

3.4.0-beta.10

6 years ago

3.4.0-beta.9

6 years ago

3.4.0-beta.8

6 years ago

4.0.0-beta.1

6 years ago

3.4.0-beta.7

6 years ago

3.3.8

6 years ago

3.4.0-beta.6

6 years ago

3.4.0-beta.5

6 years ago

3.4.0-beta.4

6 years ago

3.4.0-beta.3

6 years ago

3.3.7

6 years ago

3.3.6

6 years ago

3.3.5

6 years ago

3.3.4

6 years ago

3.3.3

6 years ago

3.4.0-beta.2

7 years ago

3.3.2

7 years ago

3.4.0-beta.1

7 years ago

3.3.0-beta.2

7 years ago

3.3.1

7 years ago

3.3.0-beta.1

7 years ago

3.3.0

7 years ago

3.2.0

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.3.0

7 years ago

2.2.4

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago