Skip to content

Commit 216b2d3

Browse files
committed
add semantic-release configuration
1 parent 5320cdb commit 216b2d3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

semantic_release/analyzeCommits.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function isBreakingChange(commit) {
2+
return commit.message.toLowerCase().includes('breaking changes');
3+
}
4+
5+
module.exports = function (pluginConfig, {commits}, callback) {
6+
const breakingChanges = commits.some((commit) => isBreakingChange(commit));
7+
8+
callback(null, breakingChanges ? 'minor' : 'patch');
9+
};

semantic_release/verifyConditions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = function (pluginConfig, config, callback) {
2+
3+
// we have no conditions to verify
4+
callback(null);
5+
};

0 commit comments

Comments
 (0)