docs: clarify config file format

This commit is contained in:
Pierre Vanduynslager 2018-06-04 12:48:50 -04:00
parent ddcf29acf7
commit 4d47b20831

View File

@ -6,7 +6,7 @@ In order to customize **semantic-release**s behavior, [options](#options) and
- A `release` key in the project's `package.json` file
- CLI arguments
The following two examples are the same.
The following three examples are the same.
Via CLI argument:
@ -17,9 +17,22 @@ $ semantic-release --branch next
Via `release` key in the project's `package.json` file:
```json
{
"release": {
"branch": "next"
}
}
```
```bash
$ semantic-release
```
Via `.releaserc` file:
```json
{
"branch": "next"
}
```
```bash
$ semantic-release
@ -29,6 +42,8 @@ $ semantic-release
**Note**: Plugin options cannot be defined via CLI arguments and must be defined in the configuration file.
**Note**: When configuring via `package.json`, the configuration must be under the `release` property. However, when using a `.releaserc` or a `release.config.js` file, the configuration must be set without a `release` property.
## Environment variables
| Variable | Description | Default |