This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bumpVersion(bumpType) { | |
return function () { | |
var version = null; | |
gulp.src('./package.json') | |
.pipe(bump({type: bumpType})) | |
.pipe(gulp.dest('./')) | |
.pipe(tap(function (file) { | |
version = JSON.parse(String(file.contents)).version; | |
process.stdout.write('version ' + version); // correct version here | |
})) | |
.pipe(git.commit("Bump package version: " + version)) // but null here | |
.pipe(git.tag("v" + version, 'Version message', function (err) { // and here | |
if (err) throw err; | |
})); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment