Skip to content
Snippets Groups Projects
Commit accf0dba authored by Kevin Jahns's avatar Kevin Jahns
Browse files

fixed bump script

parent 6b8ce0ab
No related branches found
No related tags found
No related merge requests found
Subproject commit f21e1c549a12275c36980fe6d117fa1589f1ff69
Subproject commit 5c7bab422f236b5d29f767f8c6b6f0dfef55cfde
......@@ -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('./'))
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment