From 4d47b20831a7af8bb1bdc95db05034a4bfc698a9 Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Mon, 4 Jun 2018 12:48:50 -0400 Subject: [PATCH] docs: clarify config file format --- docs/usage/configuration.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/usage/configuration.md b/docs/usage/configuration.md index c285c5e6..614649f4 100644 --- a/docs/usage/configuration.md +++ b/docs/usage/configuration.md @@ -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,7 +17,20 @@ $ semantic-release --branch next Via `release` key in the project's `package.json` file: ```json -"release": { +{ + "release": { + "branch": "next" + } +} +``` +```bash +$ semantic-release +``` + +Via `.releaserc` file: + +```json +{ "branch": "next" } ``` @@ -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 |