23 Commits

Author SHA1 Message Date
Pierre Vanduynslager
a93c96fec9 revert: fix: allow plugins to set environment variables to be used by other plugins
This reverts commit 68f7e928f93440a891fdb7c053d37082e228e1a6.
2020-02-07 17:50:14 -05:00
Pierre Vanduynslager
68f7e928f9 fix: allow plugins to set environment variables to be used by other plugins 2020-02-07 13:51:20 -08:00
greenkeeper[bot]
448a0ff977 chore(package): update xo to version 0.24.0 2019-01-30 17:27:04 -05:00
Pierre Vanduynslager
90da6a0bc1 feat: add logs about prepare, publish, success and fail plugins skipped in dry-run mode 2018-11-14 11:27:06 -05:00
Pierre Vanduynslager
6d0bd8c9b1 fix: add debug logs for plugins resolved options 2018-11-02 15:00:12 -04:00
Pierre Vanduynslager
ff275a5cd4 fix: use module name in logs for plugins loaded with plugins option 2018-10-09 15:29:04 -04:00
Pierre Vanduynslager
5ba5010c80 feat: add new plugins option 2018-10-08 13:24:51 -04:00
greenkeeper[bot]
fa62d427b6 chore(package): update xo to version 0.23.0 2018-09-03 16:54:31 -04:00
Pierre Vanduynslager
63d422ed5c fix: do not clone stdout/stderr passed to pugins 2018-08-04 20:33:26 -04:00
Pierre Vanduynslager
0626d57116 feat: log with signale and allow to customize stdin and stdout 2018-07-29 21:56:21 -04:00
Pierre Vanduynslager
a94e08de9a feat: pass cwd and env context to plugins
- Allow to run semantic-release (via API) from anywhere passing the current working directory.
- Allows to simplify the tests and to run them in parallel in both the core and plugins.
2018-07-17 00:42:04 -04:00
Pierre Vanduynslager
24ce560065 refactor: build plugin pipeline parameters at initialization
In addition, factorize the pipeline config function to avoid code duplication.
2018-07-10 13:18:58 -04:00
Pierre Vanduynslager
576eb6027f refactor: simplify plugin validation 2018-07-10 13:18:58 -04:00
Pierre Vanduynslager
09348f1b8a style: disable max-params warning for lib/plugins/normalize.js 2018-07-10 13:18:58 -04:00
Matt Travi
6a36832398 fix(plugin-load): clarify load message
added quotes around plugin name to set it apart from the message. without the quotes, some consumers
were missunderstanding the successful loading of the `fail` plugin as a load failure and assuming
something was broken

resolves #811
2018-06-05 22:27:05 -07:00
greenkeeper[bot]
f3e4991819 chore(package): update xo to version 0.21.0 2018-05-04 16:06:24 -04:00
Pierre Vanduynslager
49f5e704ba feat: add success and fail notification plugins
- Allow `publish` plugins to return an `Object` with information related to the releases
- Add the `success` plugin hook, called when all `publish` are successful, receiving a list of release
- Add the `fail` plugin hook, called when an error happens at any point, receiving a list of errors
- Add detailed message for each error
2018-02-11 19:53:41 -05:00
Pierre Vanduynslager
754b420fd6 feat: support sharable configuration
Adds the options `extends`, which can be defined via configuration file or CLI arguments to a single path or an array of paths of shareable configuration.
A shareable configuration is a file or a module that can be loaded with `require`.
Options is defined by merging in the following order of priority:
- CLI/API
- Configuration file
- Shareable configuration (from right to left)

Options set in a shareable configuration can be unset by setting it to `null` or `undefined` in the main configuration file. If a default value applies to this property it will be used.
2017-12-22 14:22:30 -05:00
Pierre Vanduynslager
f707b1a90a feat: allow to define plugin options globally 2017-12-22 14:22:30 -05:00
Pierre Vanduynslager
4053d8f7fb fix: log plugin type in addition of path 2017-12-10 04:03:32 -05:00
Pierre Vanduynslager
613a646363 fix: Typo in error messages 2017-11-29 18:06:14 -05:00
Pierre Vanduynslager
5bec59b26b feat: Expect plugins to return Promises
BREAKING CHANGE: Each plugin is expected to return an async function or a Promise returning function. The callback parameter is not passed to plugins anymore.
2017-11-24 21:56:15 -05:00
Pierre Vanduynslager
d548edcf37 feat: Extract npm and github publish to plugins
- Add a new plugin type: `publish`
- Add support for multi-plugin. A plugin module can now return an object with a property for each plugin type
- Uses by default [npm](https://github.com/semantic-release/npm) and [github](https://github.com/semantic-release/github) in addition of Travis for the verify condition plugin
- Uses by default [npm](https://github.com/semantic-release/npm) and [github](https://github.com/semantic-release/github) for the publish plugin
- `gitTag` if one can be found is passed to `generateNotes` for both `lastRelease` and `nextRelease`
- `semantic-release` now verifies the plugin configuration (in the `release` property of `package.json`) and throws an error if it's invalid
- `semantic-release` now verifies each plugin output and will throw an error if a plugin returns an unexpected value.

BREAKING CHANGE: `githubToken`, `githubUrl` and `githubApiPathPrefix` have to be set at the [github](https://github.com/semantic-release/github) plugin level. They can be set via `GH_TOKEN`, `GH_URL` and `GH_PREFIX` environment variables.

BREAKING CHANGE: the `npm` parameter is not passed to any plugin anymore. Each plugin have to read `.npmrc` if they needs to (with https://github.com/kevva/npm-conf for example).
2017-11-21 16:41:04 -05:00