From 3221678eb9f9d1599afdf62f5ba60a37f95cc0e3 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 19 Apr 2016 21:42:48 -0400 Subject: [PATCH] feat(gulp): port `grunt buildcontrol` tasks over to gulp --- app/templates/_package.json | 2 ++ app/templates/gulpfile.babel(gulp).js | 46 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/app/templates/_package.json b/app/templates/_package.json index 8447904a9..6981cba23 100644 --- a/app/templates/_package.json +++ b/app/templates/_package.json @@ -89,6 +89,8 @@ "gulp-scss-lint": "^0.3.9",<% } if(filters.less) { %> "gulp-less": "^3.0.3", "gulp-recess": "^1.1.2",<% } %> + "grunt": "^1.0.1", + "grunt-build-control": "^0.7.0", "isparta": "^4.0.0", "utile": "~0.3.0", "nodemon": "^1.3.7", diff --git a/app/templates/gulpfile.babel(gulp).js b/app/templates/gulpfile.babel(gulp).js index c75c1f0d3..3cb4b2573 100644 --- a/app/templates/gulpfile.babel(gulp).js +++ b/app/templates/gulpfile.babel(gulp).js @@ -4,6 +4,7 @@ import _ from 'lodash'; import del from 'del'; import gulp from 'gulp'; +import grunt from 'grunt'; import path from 'path'; import gulpLoadPlugins from 'gulp-load-plugins'; import http from 'http'; @@ -713,3 +714,48 @@ gulp.task('test:e2e', ['env:all', 'env:test', 'start:server', 'webdriver_update' process.exit(); }); }); + +/******************** + * Grunt ported tasks + ********************/ + +grunt.initConfig({ + buildcontrol: { + options: { + dir: paths.dist, + commit: true, + push: true, + connectCommits: false, + message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%' + }, + heroku: { + options: { + remote: 'heroku', + branch: 'master' + } + }, + openshift: { + options: { + remote: 'openshift', + branch: 'master' + } + } + } +}); + +grunt.loadNpmTasks('grunt-build-control'); + +gulp.task('buildcontrol:heroku', function(done) { + grunt.tasks( + ['buildcontrol:heroku'], //you can add more grunt tasks in this array + {gruntfile: false}, //don't look for a Gruntfile - there is none. :-) + function() {done();} + ); +}); +gulp.task('buildcontrol:openshift', function(done) { + grunt.tasks( + ['buildcontrol:openshift'], //you can add more grunt tasks in this array + {gruntfile: false}, //don't look for a Gruntfile - there is none. :-) + function() {done();} + ); +});