Skip to content

Commit

Permalink
Workaround to fix bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciosoares committed Jun 29, 2015
1 parent 3a1775d commit 7d9ad14
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ module.exports = function(grunt) {
// config pack
app.pack = grunt.config('pkg', grunt.file.readJSON('package.json'));

// config banner
app.banner = '/** ' +
'\n* ' + app.pack.name + ' -v' + grunt.file.readJSON('package.json').version +
'\n* Copyright (c) '+ grunt.template.today('yyyy') + ' ' + app.pack.author +
'\n* Licensed ' + app.pack.license + '\n*/\n\n';

// really?? I mean, really????
function updateBanner() {
app.banner = '/** ' +
'\n* ' + app.pack.name + ' -v' + grunt.file.readJSON('package.json').version +
'\n* Copyright (c) '+ grunt.template.today('yyyy') + ' ' + app.pack.author +
'\n* Licensed ' + app.pack.license + '\n*/\n\n';

config.concat.options.banner = app.banner;
config.uglify.all.options.banner = app.banner;
};

// =============================================
// bump
Expand Down Expand Up @@ -154,6 +158,8 @@ module.exports = function(grunt) {
src: 'bin/coverage/lcov.info'
};

updateBanner();

// Load all tasks
tasks.forEach(grunt.loadNpmTasks);

Expand All @@ -167,6 +173,10 @@ module.exports = function(grunt) {

grunt.registerTask('release', function () {
grunt.task.run('bump-only%patch%'.replace('%patch%', app.patch ? ':' + app.patch : ''));
grunt.task.run('dist');
setTimeout(function() {
updateBanner();
grunt.task.run('dist');
}, 0);
// grunt.task.run('dist');
});
};

0 comments on commit 7d9ad14

Please sign in to comment.