From accf0dbafb01bac47e064883938661faf26aac41 Mon Sep 17 00:00:00 2001
From: Kevin Jahns <kevin.jahns@rwth-aachen.de>
Date: Tue, 26 Apr 2016 15:01:22 +0200
Subject: [PATCH] fixed bump script

---
 dist               |  2 +-
 gulpfile.helper.js | 29 ++++++++++++++++++++++++-----
 2 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/dist b/dist
index f21e1c54..5c7bab42 160000
--- a/dist
+++ b/dist
@@ -1 +1 @@
-Subproject commit f21e1c549a12275c36980fe6d117fa1589f1ff69
+Subproject commit 5c7bab422f236b5d29f767f8c6b6f0dfef55cfde
diff --git a/gulpfile.helper.js b/gulpfile.helper.js
index c07e1ad4..bc66de9a 100644
--- a/gulpfile.helper.js
+++ b/gulpfile.helper.js
@@ -127,9 +127,8 @@ module.exports = function (gulp, helperOptions) {
       ]))
   })
 
-  gulp.task('bump', function () {
-    var bumptype
-    return gulp.src(['./package.json', './bower.json', './dist/bower.json'], {base: '.'})
+  gulp.task('bump', function (cb) {
+    gulp.src(['./package.json', './bower.json', './dist/bower.json'], {base: '.'})
       .pipe($.prompt.prompt({
         type: 'checkbox',
         name: 'bump',
@@ -139,9 +138,29 @@ module.exports = function (gulp, helperOptions) {
         if (res.bump.length === 0) {
           console.info('You have to select a bump type. Now I\'m going to use "patch" as bump type..')
         }
-        bumptype = res.bump[0]
+        var bumptype = res.bump[0]
+        if (bumptype === 'major') {
+          runSequence('bump_major', cb)
+        } else if (bumptype === 'minor') {
+          runSequence('bump_minor', cb)
+        } else {
+          runSequence('bump_patch', cb)
+        }
       }))
-      .pipe($.bump({type: bumptype}))
+  })
+  gulp.task('bump_patch', function () {
+    return gulp.src(['./package.json', './bower.json', './dist/bower.json'], {base: '.'})
+      .pipe($.bump({type: 'patch'}))
+      .pipe(gulp.dest('./'))
+  })
+  gulp.task('bump_minor', function () {
+    return gulp.src(['./package.json', './bower.json', './dist/bower.json'], {base: '.'})
+      .pipe($.bump({type: 'minor'}))
+      .pipe(gulp.dest('./'))
+  })
+  gulp.task('bump_major', function () {
+    return gulp.src(['./package.json', './bower.json', './dist/bower.json'], {base: '.'})
+      .pipe($.bump({type: 'major'}))
       .pipe(gulp.dest('./'))
   })
 
-- 
GitLab