Skip to content

Commit

Permalink
chore(build-process): Better release process automation
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonC authored and SimeonC committed Dec 15, 2014
1 parent 487dab6 commit b764f76
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Gruntfile.js
Expand Up @@ -10,11 +10,18 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-karma-coveralls');
grunt.loadNpmTasks('grunt-conventional-changelog');
grunt.loadNpmTasks('grunt-bump');

grunt.registerTask('compile', ['concat', 'uglify']);
grunt.registerTask('default', ['compile', 'test']);
grunt.registerTask('test', ['clean', 'jshint', 'karma', 'coverage']);
grunt.registerTask('travis-test', ['jshint', 'karma', 'coverage', 'coveralls']);
grunt.registerTask('travis-test', ['concat', 'jshint', 'karma', 'coverage', 'coveralls']);

grunt.registerTask('release', ['bump-only','compile','changelog','bump-commit']);
grunt.registerTask('release:patch', ['bump-only:patch','compile','changelog','bump-commit']);
grunt.registerTask('release:minor', ['bump-only:minor','compile','changelog','bump-commit']);
grunt.registerTask('release:major', ['bump-only:major','compile','changelog','bump-commit']);
grunt.registerTask('release:prerelease', ['bump-only:prerelease','compile','changelog','bump-commit']);

var testConfig = function (configFile, customOptions) {
var options = { configFile: configFile, keepalive: true };
Expand All @@ -24,7 +31,17 @@ module.exports = function (grunt) {

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
changelog: {options: {dest: 'changelog.md'}},

bump: {
options: {
files: ['package.json','bower.json'],
commitFiles: ['package.json', 'changelog.md','bower.json'],
pushTo: 'origin',
updateConfigs: ['pkg','bower']
}
},
clean: ["coverage"],
coverage: {
options: {
Expand Down Expand Up @@ -68,7 +85,7 @@ module.exports = function (grunt) {
},
concat: {
options: {
banner: "/*\n@license textAngular\nAuthor : Austin Anderson\nLicense : 2013 MIT\nVersion 1.3.0-pre15\n\nSee README.md or https://github.com/fraywing/textAngular/wiki for requirements and use.\n*/\n\n(function(){ // encapsulate all variables so they don't become global vars\n\"Use Strict\";",
banner: "/*\n@license textAngular\nAuthor : Austin Anderson\nLicense : 2013 MIT\nVersion <%- pkg.version %>\n\nSee README.md or https://github.com/fraywing/textAngular/wiki for requirements and use.\n*/\n\n(function(){ // encapsulate all variables so they don't become global vars\n\"Use Strict\";",
footer: "})();"
},
dist: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -23,6 +23,7 @@
"devDependencies": {
"bower": "^1.3.3",
"grunt": "~0.4.2",
"grunt-bump": "0.0.16",
"grunt-cli": "~0.1.11",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "^0.5.0",
Expand Down

0 comments on commit b764f76

Please sign in to comment.