Gathering detailed insights and metrics for @semantic-release/exec
Gathering detailed insights and metrics for @semantic-release/exec
Gathering detailed insights and metrics for @semantic-release/exec
Gathering detailed insights and metrics for @semantic-release/exec
semantic-release
Automated semver compliant package publishing
@semantic-release/github
semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues
@semantic-release/error
errors with more than just a message
@semantic-release/npm
semantic-release plugin to publish a npm package
🐚 semantic-release plugin to execute custom shell commands
npm install @semantic-release/exec
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
136 Stars
339 Commits
26 Forks
5 Watching
17 Branches
18 Contributors
Updated on 17 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
11.7%
76,045
Compared to previous day
Last week
7.6%
379,380
Compared to previous week
Last month
13.9%
1,534,371
Compared to previous month
Last year
34.4%
13,960,939
Compared to previous year
1
6
semantic-release plugin to execute custom shell commands.
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. |
1$ npm install @semantic-release/exec -D
The plugin can be configured in the semantic-release configuration file:
1{ 2 "plugins": [ 3 "@semantic-release/commit-analyzer", 4 "@semantic-release/release-notes-generator", 5 ["@semantic-release/exec", { 6 "verifyConditionsCmd": "./verify.sh", 7 "publishCmd": "./publish.sh ${nextRelease.version} ${branch.name} ${commits.length} ${Date.now()}" 8 }], 9 ] 10}
With this example:
./verify.sh
will be executed on the verify conditions step./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 stepNote: 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.
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.
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
all dependencies are pinned
Details
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
packaging workflow detected
Details
Reason
0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1
Reason
9 existing vulnerabilities detected
Details
Reason
Found 0/1 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More