diff options
author | liabru <liabru@brm.io> | 2016-01-04 20:22:48 +0000 |
---|---|---|
committer | liabru <liabru@brm.io> | 2016-01-04 20:22:48 +0000 |
commit | 49cc72f82ff98f8e403a123fada60e1360eeb334 (patch) | |
tree | ee5fb769c376952d4f2655a371baf97e79158643 /gulpfile.js | |
parent | 445799d32e72c0946e7694d81218285be3a818ec (diff) | |
download | jquery-match-height-49cc72f82ff98f8e403a123fada60e1360eeb334.zip jquery-match-height-49cc72f82ff98f8e403a123fada60e1360eeb334.tar.gz jquery-match-height-49cc72f82ff98f8e403a123fada60e1360eeb334.tar.bz2 |
added release tasks
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 36 |
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 |