You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`verifyConditions`| Execute a shell command to verify if the release should happen. |
15
+
|`analyzeCommits`| Execute a shell command to determine the type of release. |
16
+
|`verifyRelease`| Execute a shell command to verifying a release that was determined before and is about to be published. |
17
+
|`generateNotes`| Execute a shell command to generate the release note. |
18
+
|`prepare`| Execute a shell command to prepare the release. |
19
+
|`publish`| Execute a shell command to publish the release. |
20
+
|`success`| Execute a shell command to notify of a new release. |
21
+
|`fail`| Execute a shell command to notify of a failed release. |
22
+
23
+
## Install
24
+
25
+
```bash
26
+
$ npm install @semantic-release/exec -D
27
+
```
28
+
29
+
## Usage
30
+
31
+
The plugin can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#configuration):
- the shell command `./verify.sh` will be executed on the [verify conditions step](https://github.com/semantic-release/semantic-release#release-steps)
48
+
- 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](https://github.com/semantic-release/semantic-release#release-steps)
|`verifyConditionsCmd`| The shell command to execute during the verify condition step. See [verifyConditionsCmd](#verifyconditionscmd). |
57
+
|`analyzeCommitsCmd`| The shell command to execute during the analyze commits step. See [analyzeCommitsCmd](#analyzecommitscmd). |
58
+
|`verifyReleaseCmd`| The shell command to execute during the verify release step. See [verifyReleaseCmd](#verifyreleasecmd). |
59
+
|`generateNotesCmd`| The shell command to execute during the generate notes step. See [generateNotesCmd](#generatenotescmd). |
60
+
|`prepareCmd`| The shell command to execute during the prepare step. See [prepareCmd](#preparecmd). |
61
+
|`publishCmd`| The shell command to execute during the publish step. See [publishCmd](#publishcmd). |
62
+
|`successCmd`| The shell command to execute during the success step. See [successCmd](#successcmd). |
63
+
|`failCmd`| The shell command to execute during the fail step. See [failCmd](#failcmd). |
64
+
|`shell`| The shell to use to run the command. See [execa#shell](https://github.com/sindresorhus/execa#shell). |
65
+
66
+
Each shell command is generated with [Lodash template](https://lodash.com/docs#template). All the objets passed to the [semantic-release plugins](https://github.com/semantic-release/semantic-release#plugins) are available as template options.
67
+
68
+
## verifyConditionsCmd
13
69
14
70
Execute a shell command to verify if the release should happen.
15
71
@@ -19,130 +75,58 @@ Execute a shell command to verify if the release should happen.
19
75
|`stdout`| Write only the reason for the verification to fail. |
20
76
|`stderr`| Can be used for logging. |
21
77
22
-
## analyzeCommits
23
-
24
-
Execute a shell command to determine the type release.
|`exit code`| Any non `0` code is considered as an unexpected error and will stop the `semantic-release` execution with an error. |
29
83
|`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`. |
30
84
|`stderr`| Can be used for logging. |
31
85
32
-
## verifyRelease
33
-
34
-
Execute a shell command to verifying a release that was determined before and is about to be published.
|`exit code`| Any non `0` code is considered as an unexpected error and will stop the `semantic-release` execution with an error. |
69
115
|`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. |
70
116
|`stderr`| Can be used for logging. |
71
117
72
-
## success
73
-
74
-
Execute a shell command to notify of a successful release.
|`cmd`| The shell command to execute. See [cmd](#cmd). |
99
-
|`shell`| The shell to use to run the command. See [execa#shell](https://github.com/sindresorhus/execa#shell). |
100
-
101
-
#### `cmd`
102
-
103
-
The shell command is generated with [Lodash template](https://lodash.com/docs#template). All the objets passed to the [semantic-release plugins](https://github.com/semantic-release/semantic-release#plugins) are available as template options.
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`).
123
-
124
-
### Usage
125
-
126
-
Options can be set within the plugin definition in the `semantic-release` configuration file:
0 commit comments