semantic-release / exec

Licence: MIT license
🐚 semantic-release plugin to execute custom shell commands

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to exec

Semantic Release
📦🚀 Fully automated version management and package publishing
Stars: ✭ 14,364 (+15180.85%)
Mutual labels:  version, release, semantic-release, publish
Cli
🆑📍 Setup automated semver compliant package publishing
Stars: ✭ 272 (+189.36%)
Mutual labels:  version, release, publish
Npm
🚢 semantic-release plugin to publish a npm package
Stars: ✭ 103 (+9.57%)
Mutual labels:  version, release, publish
git
🔀 semantic-release plugin to commit release assets to the project's git repository
Stars: ✭ 235 (+150%)
Mutual labels:  version, release, semantic-release
Github
semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues
Stars: ✭ 159 (+69.15%)
Mutual labels:  version, release, publish
Standard Version
🏆 Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
Stars: ✭ 5,806 (+6076.6%)
Mutual labels:  version, release
Metav
Release and Versioning of Clojure projects using tools.deps
Stars: ✭ 62 (-34.04%)
Mutual labels:  version, release
prepublish
Simplifies the prepare step (bundling, transpiling, rebasing) during publishing NPM packages.
Stars: ✭ 21 (-77.66%)
Mutual labels:  release, publish
perfekt
Release, changelog and version your packages with perfe(k)t 👌 ease!
Stars: ✭ 15 (-84.04%)
Mutual labels:  version, release
Publish Nuget
📦 GitHub action to automate publishing NuGet packages when project version changes
Stars: ✭ 109 (+15.96%)
Mutual labels:  version, release
Changelog
📘 semantic-release plugin to create or update a changelog file
Stars: ✭ 142 (+51.06%)
Mutual labels:  version, release
Bump
Bump updates the project's version, updates/creates the changelog, makes the bump commit, tags the bump commit and makes the release to GitHub. Opinionated but configurable.
Stars: ✭ 327 (+247.87%)
Mutual labels:  version, release
wisdom
🎁 Tool for publishing releases to github and npm
Stars: ✭ 16 (-82.98%)
Mutual labels:  release, publish
semantic-release-slack-bot
📦 🚀 A slack bot for semantic-release notifying release statuses
Stars: ✭ 92 (-2.13%)
Mutual labels:  release, semantic-release
Python Semver
Python package to work with Semantic Versioning (http://semver.org/)
Stars: ✭ 264 (+180.85%)
Mutual labels:  version, release
next-ver
Tells you the next semantic version for your local package
Stars: ✭ 27 (-71.28%)
Mutual labels:  version, release
Release Notes Generator
📋 semantic-release plugin to generate changelog content with conventional-changelog
Stars: ✭ 123 (+30.85%)
Mutual labels:  release, publish
Commit Analyzer
💡 semantic-release plugin to analyze commits with conventional-changelog
Stars: ✭ 146 (+55.32%)
Mutual labels:  release, publish
dont-crack
semantic-release plugin checking if the new semantic release is breaking dependent projects
Stars: ✭ 14 (-85.11%)
Mutual labels:  release, semantic-release
xyz
Publish npm packages with fewer screw-ups
Stars: ✭ 101 (+7.45%)
Mutual labels:  release, publish

@semantic-release/exec

semantic-release plugin to execute custom shell commands.

Build Status npm latest version npm next version npm beta version

Step Description
verifyConditions Execute a shell command to verify if the release should happen.
analyzeCommits Execute a shell command to determine the type of release.
verifyRelease Execute a shell command to verifying a release that was determined before and is about to be published.
generateNotes Execute a shell command to generate the release note.
prepare Execute a shell command to prepare the release.
publish Execute a shell command to publish the release.
success Execute a shell command to notify of a new release.
fail Execute a shell command to notify of a failed release.

Install

$ npm install @semantic-release/exec -D

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["@semantic-release/exec", {
      "verifyConditionsCmd": "./verify.sh",
      "publishCmd": "./publish.sh ${nextRelease.version} ${options.branch} ${commits.length} ${Date.now()}"
    }],
  ]
}

With this example:

  • the shell command ./verify.sh will be executed on the verify conditions step
  • 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) will be executed on the publish step

Note: it's required to define a plugin for the analyze commits step. If no analyzeCommitsCmd is defined the plugin @semantic-release/commit-analyzer must be defined in the plugins list.

Configuration

Options

Options Description
verifyConditionsCmd The shell command to execute during the verify condition step. See verifyConditionsCmd.
analyzeCommitsCmd The shell command to execute during the analyze commits step. See analyzeCommitsCmd.
verifyReleaseCmd The shell command to execute during the verify release step. See verifyReleaseCmd.
generateNotesCmd The shell command to execute during the generate notes step. See generateNotesCmd.
prepareCmd The shell command to execute during the prepare step. See prepareCmd.
addChannelCmd The shell command to execute during the add channel step. See addChannelCmd.
publishCmd The shell command to execute during the publish step. See publishCmd.
successCmd The shell command to execute during the success step. See successCmd.
failCmd The shell command to execute during the fail step. See failCmd.
shell The shell to use to run the command. See execa#shell.
execCwd The path to use as current working directory when executing the shell commands. This path is relative to the path from which semantic-release is running. For example if semantic-release runs from /my-project and execCwd is set to buildScripts then the shell command will be executed from /my-project/buildScripts

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

verifyConditionsCmd

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

Command property Description
exit code 0 if the verification is successful, or any other exit code otherwise.
stdout Write only the reason for the verification to fail.
stderr Can be used for logging.

analyzeCommitsCmd

Command property Description
exit code Any non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdout Only 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.
stderr Can be used for logging.

verifyReleaseCmd

Command property Description
exit code 0 if the verification is successful, or any other exit code otherwise.
stdout Only the reason for the verification to fail can be written to stdout.
stderr Can be used for logging.

generateNotesCmd

Command property Description
exit code Any non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdout Only the release note must be written to stdout.
stderr Can be used for logging.

prepareCmd

Command property Description
exit code Any non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdout Can be used for logging.
stderr Can be used for logging.

addChannelCmd

Command property Description
exit code Any non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdout The release information can be written to stdout as parseable JSON (for example {"name": "Release name", "url": "http://url/release/1.0.0"}). If the command write non parseable JSON to stdout no release information will be returned.
stderr Can be used for logging.

publishCmd

Command property Description
exit code Any non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdout The release information can be written to stdout as parseable JSON (for example {"name": "Release name", "url": "http://url/release/1.0.0"}). If the command write non parseable JSON to stdout no release information will be returned.
stderr Can be used for logging.

successCmd

Command property Description
exit code Any non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdout Can be used for logging.
stderr Can be used for logging.

failCmd

Command property Description
exit code Any non 0 code is considered as an unexpected error and will stop the semantic-release execution with an error.
stdout Can be used for logging.
stderr Can be used for logging.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].