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:
parent
9d396feb3f
commit
e13d2d2645
1 changed files with 22 additions and 4 deletions
26
Gulpfile.js
26
Gulpfile.js
|
@ -35,11 +35,29 @@ gulp.task('dev', function(callback) {
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('release', 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) {
|
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) {
|
gulp.task('release:push:github', function(callback) {
|
||||||
|
@ -250,8 +268,8 @@ var build = function(options) {
|
||||||
|
|
||||||
var shell = function(command, callback) {
|
var shell = function(command, callback) {
|
||||||
var args = process.argv.slice(3).join(' '),
|
var args = process.argv.slice(3).join(' '),
|
||||||
proc = exec(command + ' ' + args, function(err) {
|
proc = exec(command + ' ' + args, function(err, stdout, stderr) {
|
||||||
callback(err);
|
callback(err, stdout, stderr, proc);
|
||||||
});
|
});
|
||||||
|
|
||||||
proc.stdout.on('data', function(data) {
|
proc.stdout.on('data', function(data) {
|
||||||
|
|
Loading…
Reference in a new issue