Skip to content

Commit 7c1a9cd

Browse files
committed
add grunt build control
1 parent 9ad61ef commit 7c1a9cd

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

Diff for: app/templates/Gruntfile.js

+19-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ module.exports = function (grunt) {
1616
ngtemplates: 'grunt-angular-templates',
1717
cdnify: 'grunt-google-cdn',
1818
protractor: 'grunt-protractor-runner',
19-
injector: 'grunt-asset-injector'
19+
injector: 'grunt-asset-injector',
20+
buildcontrol: 'grunt-build-control'
2021
});
2122

2223
// Time how long tasks take. Can help when optimizing build times
@@ -26,6 +27,7 @@ module.exports = function (grunt) {
2627
grunt.initConfig({
2728

2829
// Project settings
30+
pkg: grunt.file.readJSON('package.json'),
2931
yeoman: {
3032
// configurable paths
3133
client: require('./bower.json').appPath || 'client',
@@ -407,6 +409,22 @@ module.exports = function (grunt) {
407409
}
408410
},
409411

412+
buildcontrol: {
413+
options: {
414+
dir: 'dist',
415+
commit: true,
416+
push: true,
417+
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
418+
},
419+
heroku: {
420+
options: {
421+
remote: 'heroku',
422+
branch: 'master',
423+
tag: '<%%= pkg.version %>'
424+
}
425+
}
426+
},
427+
410428
// Run some tasks in parallel to speed up the build process
411429
concurrent: {
412430
server: [<% if(filters.coffee) { %>

Diff for: app/templates/_package.json

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"grunt-protractor-runner": "^1.1.0",
6060
"grunt-asset-injector": "^0.1.0",
6161
"grunt-karma": "~0.8.2",
62+
"grunt-build-control": "DaftMonk/grunt-build-control",
6263
"grunt-mocha-test": "~0.10.2",<% if(filters.sass) { %>
6364
"grunt-contrib-sass": "^0.7.3",<% } %><% if(filters.stylus) { %>
6465
"grunt-contrib-stylus": "latest",<% } %>

0 commit comments

Comments
 (0)