summaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js
index f8d64cf..0e99488 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -9,6 +9,7 @@ var eslint = require('gulp-eslint');
var gulpBump = 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');
@@ -26,6 +27,26 @@ gulp.task('release', function(callback) {
sequence('lint', 'test', 'build', 'bump:' + type, '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', 'jquery.matchHeight-min.js', 'jquery.matchHeight.js'])
+ .pipe(release({
+ tag: pkg.version,
+ name: 'jquery.matchHeight.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', function() {
var build = extend(pkg);
build.version = process.argv[4] || pkg.version;
@@ -221,3 +242,18 @@ var emulateIEMiddleware = {
'ie9': emulateIEMiddlewareFactory(9),
'ie10': emulateIEMiddlewareFactory(10)
};
+
+var shell = function(command, callback) {
+ var args = process.argv.slice(3).join(' '),
+ proc = exec(command + ' ' + args, function(err) {
+ callback(err);
+ });
+
+ proc.stdout.on('data', function(data) {
+ process.stdout.write(data);
+ });
+
+ proc.stderr.on('data', function(data) {
+ process.stderr.write(data);
+ });
+}; \ No newline at end of file