0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-05 15:18:39 -05:00

added release tasks

This commit is contained in:
liabru 2016-01-14 23:44:04 +00:00
parent a9122ed488
commit 5479fbcb77
2 changed files with 30 additions and 1 deletions

View file

@ -6,6 +6,7 @@ var eslint = require('gulp-eslint');
var bump = require('gulp-bump');
var changelog = require('gulp-conventional-changelog');
var tag = require('gulp-tag-version');
var release = require('gulp-github-release');
var sequence = require('run-sequence');
var gutil = require('gulp-util');
var replace = require('gulp-replace');
@ -24,6 +25,7 @@ var fs = require('fs');
var watchify = require('watchify');
var extend = require('util')._extend;
var exec = require('child_process').exec;
var buildDirectory = 'build';
var server;
gulp.task('default', ['build:dev', 'build:examples']);
@ -36,6 +38,32 @@ gulp.task('release', function(callback) {
sequence('build:dev', 'build:examples', 'test', 'build:release', 'bump', 'doc', 'changelog', 'tag', callback);
});
gulp.task('release:push', function(callback) {
sequence('release:push:git', 'release:push:github', 'release:push:npm', callback);
});
gulp.task('release:push:github', function(callback) {
return gulp.src([
'CHANGELOG.md',
'LICENSE',
buildDirectory + '/matter-' + pkg.version + '.min.js',
buildDirectory + '/matter-' + pkg.version + '.js'
]).pipe(release({
owner: 'liabru',
repo: pkg.name,
tag: pkg.version,
name: 'Matter.js ' + pkg.version
}));
});
gulp.task('release:push:git', function(callback) {
shell('git push', callback);
});
gulp.task('release:push:npm', function(callback) {
shell('npm publish', callback);
});
gulp.task('build:dev', function() {
return build(extend(extend({}, pkg), { version: 'dev' }));
});
@ -139,7 +167,7 @@ gulp.task('doc', function(callback) {
outdir: 'doc/build',
linkNatives: true,
project: {
name: pkg.name + '.js Physics Engine API Documentation for ' + pkg.version,
name: pkg.name + ' ' + pkg.version + ' Physics Engine API Docs',
description: pkg.description,
version: pkg.version,
url: pkg.homepage

View file

@ -31,6 +31,7 @@
"gulp-concat": "^2.6.0",
"gulp-conventional-changelog": "^0.7.0",
"gulp-eslint": "^1.0.0",
"gulp-github-release": "^1.1.0",
"gulp-header": "^1.7.1",
"gulp-preprocess": "^2.0.0",
"gulp-rename": "^1.2.2",