From 0b806e52dbce09cddf335cfbc61a397801c7b9cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 22 Jun 2019 13:14:16 +0200 Subject: [PATCH] Another attempt at fixing publish task I guess we'll find out shortly if it works --- gulp/tasks/publish.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gulp/tasks/publish.js b/gulp/tasks/publish.js index 8d3166ec..c8efd534 100644 --- a/gulp/tasks/publish.js +++ b/gulp/tasks/publish.js @@ -32,7 +32,7 @@ var packages = ['paper-jsdom', 'paper-jsdom-canvas'], end_with_newline: true }; -gulp.task('publish', function() { +gulp.task('publish', function(callback) { if (options.branch !== 'develop') { throw new Error('Publishing is only allowed on the develop branch.'); } @@ -45,7 +45,8 @@ gulp.task('publish', function() { 'publish:commit', 'publish:website', 'publish:release', - 'publish:load' + 'publish:load', + callback ); }); @@ -82,14 +83,14 @@ gulp.task('publish:release', function() { .pipe(shell('npm publish')); }); -gulp.task('publish:packages', function() { +gulp.task('publish:packages', function(callback) { // Publish packages in series instead of in parallel, to see if this fixes // recent issues with `npm publish`: - return run( - packages.map(function(name) { - return 'publish:packages:' + name; - }) - ); + var args = packages.map(function(name) { + return 'publish:packages:' + name; + }) + args.push(callback) + return run.call(this, args); }); packages.forEach(function(name) { @@ -112,11 +113,12 @@ packages.forEach(function(name) { }); }); -gulp.task('publish:website', function() { +gulp.task('publish:website', function(callback) { if (fs.lstatSync(sitePath).isDirectory()) { return run( 'publish:website:build', - 'publish:website:push' + 'publish:website:push', + callback ); } });