summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliabru <liabru@brm.io>2016-01-04 20:22:48 +0000
committerliabru <liabru@brm.io>2016-01-04 20:22:48 +0000
commit49cc72f82ff98f8e403a123fada60e1360eeb334 (patch)
treeee5fb769c376952d4f2655a371baf97e79158643
parent445799d32e72c0946e7694d81218285be3a818ec (diff)
downloadjquery-match-height-49cc72f82ff98f8e403a123fada60e1360eeb334.zip
jquery-match-height-49cc72f82ff98f8e403a123fada60e1360eeb334.tar.gz
jquery-match-height-49cc72f82ff98f8e403a123fada60e1360eeb334.tar.bz2
added release tasks
-rw-r--r--gulpfile.js36
-rw-r--r--package.json1
2 files changed, 37 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
diff --git a/package.json b/package.json
index 278968a..ac4b6e2 100644
--- a/package.json
+++ b/package.json
@@ -32,6 +32,7 @@
"gulp-bump": "^1.0.0",
"gulp-conventional-changelog": "^0.7.0",
"gulp-eslint": "^1.0.0",
+ "gulp-github-release": "^1.1.0",
"gulp-header": "^1.7.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",