Skip to content

Commit 3221678

Browse files
committed
feat(gulp): port grunt buildcontrol tasks over to gulp
1 parent b5552c9 commit 3221678

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

Diff for: app/templates/_package.json

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989
"gulp-scss-lint": "^0.3.9",<% } if(filters.less) { %>
9090
"gulp-less": "^3.0.3",
9191
"gulp-recess": "^1.1.2",<% } %>
92+
"grunt": "^1.0.1",
93+
"grunt-build-control": "^0.7.0",
9294
"isparta": "^4.0.0",
9395
"utile": "~0.3.0",
9496
"nodemon": "^1.3.7",

Diff for: app/templates/gulpfile.babel(gulp).js

+46
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import _ from 'lodash';
55
import del from 'del';
66
import gulp from 'gulp';
7+
import grunt from 'grunt';
78
import path from 'path';
89
import gulpLoadPlugins from 'gulp-load-plugins';
910
import http from 'http';
@@ -713,3 +714,48 @@ gulp.task('test:e2e', ['env:all', 'env:test', 'start:server', 'webdriver_update'
713714
process.exit();
714715
});
715716
});
717+
718+
/********************
719+
* Grunt ported tasks
720+
********************/
721+
722+
grunt.initConfig({
723+
buildcontrol: {
724+
options: {
725+
dir: paths.dist,
726+
commit: true,
727+
push: true,
728+
connectCommits: false,
729+
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
730+
},
731+
heroku: {
732+
options: {
733+
remote: 'heroku',
734+
branch: 'master'
735+
}
736+
},
737+
openshift: {
738+
options: {
739+
remote: 'openshift',
740+
branch: 'master'
741+
}
742+
}
743+
}
744+
});
745+
746+
grunt.loadNpmTasks('grunt-build-control');
747+
748+
gulp.task('buildcontrol:heroku', function(done) {
749+
grunt.tasks(
750+
['buildcontrol:heroku'], //you can add more grunt tasks in this array
751+
{gruntfile: false}, //don't look for a Gruntfile - there is none. :-)
752+
function() {done();}
753+
);
754+
});
755+
gulp.task('buildcontrol:openshift', function(done) {
756+
grunt.tasks(
757+
['buildcontrol:openshift'], //you can add more grunt tasks in this array
758+
{gruntfile: false}, //don't look for a Gruntfile - there is none. :-)
759+
function() {done();}
760+
);
761+
});

0 commit comments

Comments
 (0)