fix: verify branch first
This commit is contained in:
committed by
Gregor Martynus
parent
305f4ee8eb
commit
1966f0e3e2
+1
-12
@@ -3,7 +3,7 @@ const AggregateError = require('aggregate-error');
|
||||
const {isGitRepo, verifyAuth, verifyTagName} = require('./git');
|
||||
const getError = require('./get-error');
|
||||
|
||||
module.exports = async (options, branch, logger) => {
|
||||
module.exports = async options => {
|
||||
const errors = [];
|
||||
|
||||
if (!await isGitRepo()) {
|
||||
@@ -29,15 +29,4 @@ module.exports = async (options, branch, logger) => {
|
||||
if (errors.length > 0) {
|
||||
throw new AggregateError(errors);
|
||||
}
|
||||
|
||||
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 won’t be published.`
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user