0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-23 09:26:51 -05:00

improved release tasks

This commit is contained in:
liabru 2016-04-19 12:18:33 +01:00
parent 9d396feb3f
commit e13d2d2645

View file

@ -35,11 +35,29 @@ gulp.task('dev', function(callback) {
});
gulp.task('release', function(callback) {
sequence('build:dev', 'build:examples', 'test', 'bump', 'reload', 'build:edge', 'build:release', 'doc', 'changelog', callback);
shell('git status --porcelain', function(err, stdout) {
if (stdout && stdout.trim()) {
throw new gutil.PluginError({
plugin: 'release',
message: 'cannot build release as there are uncomitted changes'
});
} else {
sequence('build:dev', 'build:examples', 'test', 'bump', 'reload', 'build:edge', 'build:release', 'doc', 'changelog', callback);
}
});
});
gulp.task('release:push', function(callback) {
sequence('tag', 'release:push:git', 'release:push:github', 'release:push:npm', callback);
shell('git status --porcelain', function(err, stdout) {
if (stdout && stdout.trim()) {
throw new gutil.PluginError({
plugin: 'release',
message: 'cannot push release as it has not yet been committed'
});
} else {
sequence('tag', 'release:push:git', 'release:push:github', 'release:push:npm', callback);
}
});
});
gulp.task('release:push:github', function(callback) {
@ -250,8 +268,8 @@ var build = function(options) {
var shell = function(command, callback) {
var args = process.argv.slice(3).join(' '),
proc = exec(command + ' ' + args, function(err) {
callback(err);
proc = exec(command + ' ' + args, function(err, stdout, stderr) {
callback(err, stdout, stderr, proc);
});
proc.stdout.on('data', function(data) {