Skip to content

Commit

Permalink
fix: Add helpful detail to ERELEASEBRANCHES error message (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryaninvents authored and gr2m committed May 23, 2019
1 parent 8576f49 commit 37bcc9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/usage/configuration.md
Expand Up @@ -81,6 +81,8 @@ The branches on which releases should happen. By default **semantic-release** wi
- prereleases to the `beta` distribution channel from the branch `beta` if it exists
- prereleases to the `alpha` distribution channel from the branch `alpha` if it exists

**Note**: If your repository does not have a release branch, then **semantic-release** will fail with an `ERELEASEBRANCHES` error message. If you are using the default configuration, you can fix this error by pushing a `master` branch.

**Note**: Once **semantic-release** is configured, any user with the permission to push commits on one of those branches will be able to publish a release. It is recommended to protect those branches, for example with [GitHub protected branches](https://help.github.com/articles/about-protected-branches).

See [Plugins configuration](plugins.md#plugins) for more details.
Expand Down
2 changes: 2 additions & 0 deletions lib/definitions/errors.js
Expand Up @@ -183,6 +183,8 @@ Your configuration for the problematic branches is \`${stringify(branches)}\`.`,
details: `A minimum of 1 and a maximum of 3 release branches are required in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
)}).
This may occur if your repository does not have a release branch, such as \`master\`.
Your configuration for the problematic branches is \`${stringify(branches)}\`.`,
}),
Expand Down

0 comments on commit 37bcc9e

Please sign in to comment.