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.
This commit is contained in:
Pierre Vanduynslager
2018-07-17 00:42:04 -04:00
parent 12e4155cd3
commit a94e08de9a
32 changed files with 1361 additions and 1332 deletions
+3 -2
View File
@@ -64,8 +64,9 @@ async function createRepo(name, branch = 'master', description = `Repository ${n
// Retry as the server might take a few ms to make the repo available push
await pRetry(() => initBareRepo(authUrl, branch), {retries: 3, minTimeout: 500, factor: 2});
await gitShallowClone(authUrl);
return {repositoryUrl, authUrl};
const cwd = await gitShallowClone(authUrl);
return {cwd, repositoryUrl, authUrl};
}
export default {start, stop, gitCredential, createRepo};