From a4b04686984544fb97e8e2114d6922222827db4a Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Wed, 14 Aug 2013 03:38:18 -0700 Subject: [PATCH 1/2] Revert gruntfile changes --- Gruntfile.coffee | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index ac12b4958..a62327668 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,6 +1,5 @@ module.exports = (grunt) -> - pkg = grunt.file.readJSON 'package.json' concatOptions = process: Object.create(null, data: get: -> grunt.config 'pkg' @@ -13,7 +12,7 @@ module.exports = (grunt) -> # Project configuration. grunt.initConfig - pkg: pkg + pkg: grunt.file.readJSON 'package.json' concat: coffee: options: concatOptions @@ -169,39 +168,34 @@ module.exports = (grunt) -> grunt.registerTask 'release', [ 'build' - 'compress:crx' 'shell:commit' 'shell:push' + 'build-crx' + 'compress:crx' ] grunt.registerTask 'patch', [ 'bump' - 'reloadPkg' 'updcl:3' + 'release' ] grunt.registerTask 'minor', [ 'bump:minor' - 'reloadPkg' 'updcl:2' + 'release' ] grunt.registerTask 'major', [ 'bump:major' - 'reloadPkg' 'updcl:1' + 'release' ] - grunt.registerTask 'reloadPkg', 'Reload the package', -> - # Update the `pkg` object with the new version. - pkg = grunt.file.readJSON('package.json') - grunt.config.data.pkg = concatOptions.process.data = pkg - grunt.log.ok('pkg reloaded.') - - grunt.registerTask 'updcl', 'Update the changelog', (i) -> - # i is the number of #s for markdown. - version = [] - version.length = +i + 1 - version = version.join('#') + ' v' + pkg.version + '\n*' + grunt.template.today('yyyy-mm-dd') + '*\n' - grunt.file.write 'CHANGELOG.md', version + '\n' + grunt.file.read('CHANGELOG.md') - grunt.log.ok 'Changelog updated for v' + pkg.version + '.' + grunt.registerTask 'updcl', 'Update the changelog', (headerLevel) -> + headerPrefix = new Array(+headerLevel + 1).join '#' + {version} = grunt.config 'pkg' + today = grunt.template.today 'yyyy-mm-dd' + changelog = grunt.file.read 'CHANGELOG.md' + grunt.file.write 'CHANGELOG.md', "#{headerPrefix} #{version} - *#{today}*\n\n#{changelog}" + grunt.log.ok "Changelog updated for v#{version}." From 8442062fb3309c07cd680236aefadb9faeca20e2 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Wed, 14 Aug 2013 03:44:12 -0700 Subject: [PATCH 2/2] Finally fix Release task --- Gruntfile.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index a62327668..0deff77d2 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -168,10 +168,9 @@ module.exports = (grunt) -> grunt.registerTask 'release', [ 'build' + 'compress:crx' 'shell:commit' 'shell:push' - 'build-crx' - 'compress:crx' ] grunt.registerTask 'patch', [ 'bump'