Skip to content

Commit

Permalink
add semantic-release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
talyak committed Mar 20, 2018
1 parent 5320cdb commit 216b2d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions semantic_release/analyzeCommits.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function isBreakingChange(commit) {
return commit.message.toLowerCase().includes('breaking changes');
}

module.exports = function (pluginConfig, {commits}, callback) {
const breakingChanges = commits.some((commit) => isBreakingChange(commit));

callback(null, breakingChanges ? 'minor' : 'patch');
};
5 changes: 5 additions & 0 deletions semantic_release/verifyConditions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = function (pluginConfig, config, callback) {

// we have no conditions to verify
callback(null);
};

0 comments on commit 216b2d3

Please sign in to comment.