fix(dev-infra): exit non-zero if commit message validation failed (#36723)
Currently the `commit-message` validation script does not exit with a non-zero exit code if the commit message validation failed. This means that invalid commit messages are currently not causing CI to be red. See: https://circleci.com/gh/angular/angular/686008 PR Close #36723
This commit is contained in:
parent
b5e92b9a5d
commit
4341743b4a
@ -39,7 +39,12 @@ export function validateCommitRange(range: string) {
|
|||||||
};
|
};
|
||||||
return validateCommitMessage(m, options);
|
return validateCommitMessage(m, options);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (allCommitsInRangeValid) {
|
if (allCommitsInRangeValid) {
|
||||||
console.info('√ All commit messages in range valid.');
|
console.info('√ All commit messages in range valid.');
|
||||||
|
} else {
|
||||||
|
// Exit with a non-zero exit code if invalid commit messages have
|
||||||
|
// been discovered.
|
||||||
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user