From 2eba29ed5d4d72209548c5b16798ff4c2d2c50a9 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sun, 31 Dec 2017 17:17:53 -0700 Subject: [PATCH] Docs: Remove run-sequence from recipes --- docs/recipes/automate-release-workflow.md | 36 ++++++++--------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/docs/recipes/automate-release-workflow.md b/docs/recipes/automate-release-workflow.md index 6b2f90d04..0f18006a9 100644 --- a/docs/recipes/automate-release-workflow.md +++ b/docs/recipes/automate-release-workflow.md @@ -6,7 +6,6 @@ Below you have a simple recipe that bumps the project version, commits the chang ``` javascript var gulp = require('gulp'); -var runSequence = require('run-sequence'); var conventionalChangelog = require('gulp-conventional-changelog'); var conventionalGithubReleaser = require('conventional-github-releaser'); var bump = require('gulp-bump'); @@ -48,17 +47,17 @@ gulp.task('commit-changes', function () { .pipe(git.commit('[Prerelease] Bumped version number')); }); -gulp.task('push-changes', function (cb) { - git.push('origin', 'master', cb); +gulp.task('push-changes', function (done) { + git.push('origin', 'master', done); }); -gulp.task('create-new-tag', function (cb) { +gulp.task('create-new-tag', function (done) { var version = getPackageJsonVersion(); git.tag(version, 'Created Tag for version: ' + version, function (error) { if (error) { - return cb(error); + return done(error); } - git.push('origin', 'master', {args: '--tags'}, cb); + git.push('origin', 'master', {args: '--tags'}, done); }); function getPackageJsonVersion () { @@ -68,22 +67,13 @@ gulp.task('create-new-tag', function (cb) { }; }); -gulp.task('release', function (callback) { - runSequence( - 'bump-version', - 'changelog', - 'commit-changes', - 'push-changes', - 'create-new-tag', - 'github-release', - function (error) { - if (error) { - console.log(error.message); - } else { - console.log('RELEASE FINISHED SUCCESSFULLY'); - } - callback(error); - }); -}); +gulp.task('release', gulp.series( + 'bump-version', + 'changelog', + 'commit-changes', + 'push-changes', + 'create-new-tag', + 'github-release' +)); ```