Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDevelop committed Jan 16, 2019
2 parents 7aeccab + f666026 commit 1c4a6e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![version](https://img.shields.io/badge/Version-0.2.1-brightgreen.svg)](https://github.com/SimonDevelop/releaser-bot/releases/tag/0.2.1)
[![version](https://img.shields.io/badge/Version-0.2.2-brightgreen.svg)](https://github.com/SimonDevelop/releaser-bot/releases/tag/0.2.2)
[![Minimum Node Version](https://img.shields.io/badge/node-%3E%3D%206-brightgreen.svg)](https://nodejs.org/en/)
[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/SimonDevelop/releaser-bot/blob/master/LICENSE)
# releaser-bot
Expand Down
8 changes: 6 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ data.on('commit', function () {
// Generate release description
var split = body[0].commit.message.split("\n\n");
var array = [];
data.titleCommit = split[0];
if (split.length > 1) {
for (var i=0; i < split.length; i++) {
if (i > 0) {
Expand Down Expand Up @@ -122,10 +123,13 @@ data.on('create', function () {

var regMessageMajor = new RegExp("major", "gi");
var regMessageMinor = new RegExp("minor", "gi");
if (data.releases[0].body.match(regMessageMajor) != null) {
if (data.titleCommit.match(regMessageMajor) != null) {
major++;
} else if (data.releases[0].body.match(regMessageMinor) != null) {
minor = 0;
patch = 0;
} else if (data.titleCommit.match(regMessageMinor) != null) {
minor++;
patch = 0;
} else {
patch++;
}
Expand Down

0 comments on commit 1c4a6e8

Please sign in to comment.