fix: verify branch first

This commit is contained in:
Pierre Vanduynslager
2018-02-15 18:35:37 +00:00
committed by Gregor Martynus
parent 305f4ee8eb
commit 1966f0e3e2
4 changed files with 24 additions and 40 deletions
+9 -2
View File
@@ -29,10 +29,17 @@ async function run(options, plugins) {
return;
}
if (!await verify(options, branch, logger)) {
return;
if (branch !== options.branch) {
logger.log(
`This test run was triggered on the branch ${branch}, while semantic-release is configured to only publish from ${
options.branch
}, therefore a new version wont be published.`
);
return false;
}
await verify(options);
logger.log('Run automated release from branch %s', options.branch);
logger.log('Call plugin %s', 'verify-conditions');