Another attempt at fixing publish task

I guess we'll find out shortly if it works
This commit is contained in:
Jürg Lehni 2019-06-22 13:14:16 +02:00
parent 6c6982b563
commit 0b806e52db

View file

@ -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
);
}
});