Deployment problems with bump/tag
Closed this issue · 2 comments
luqmaan commented
The version/tag stuff keeps breaking gulp deploy
.
$ gulp deploy
[10:24:10] Using gulpfile ~/dev/MetroRappid/gulpfile.js
[10:24:10] Starting 'bump'...
[10:24:10] Finished 'bump' after 12 ms
[10:24:10] Starting 'deploy-gh-pages'...
[10:24:10] Bumped version to: 0.0.54
[10:24:10] [master 16bcf92] Update version for release :shit:
1 file changed, 1 insertion(+), 1 deletion(-)
[10:24:10] Tagging as: v0.0.54
stream.js:79
dest.end();
^
TypeError: Object #<ChildProcess> has no method 'end'
at Stream.onend (stream.js:79:10)
at Stream.emit (events.js:117:20)
at end (/Users/luqmaan/dev/MetroRappid/node_modules/gulp-tag-version/node_modules/map-stream/index.js:116:39)
at Stream.stream.end (/Users/luqmaan/dev/MetroRappid/node_modules/gulp-tag-version/node_modules/map-stream/index.js:122:5)
at DestroyableTransform.onend (/Users/luqmaan/dev/MetroRappid/node_modules/gulp-git/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:523:10)
at DestroyableTransform.g (events.js:180:16)
at DestroyableTransform.emit (events.js:117:20)
at /Users/luqmaan/dev/MetroRappid/node_modules/gulp-git/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:965:16
at process._tickDomainCallback (node.js:463:13)
Commenting these lines fixes it:
.pipe(tag())
.pipe(git.push('origin', 'master', {args: '--tags'}))
ondrejchmelar commented
Looks like git.push() cannot be used in a pipe. I had to go with this setup:
function push() {
return git.push('origin', 'master', function (err) {
if (err) throw err;
});
}
gulp.task('bump', function (cb) {
return gulp.src('./bower.json')
// ...
.pipe(tag_version(), function(err) {
cb(err);
});
});
gulp.task('bump-n-push', ['bump'], function () {
return push();
});
luqmaan commented
No longer relevant.