Permalink
Browse files

comments and remove path join

  • Loading branch information...
1 parent a1cbd7d commit 49958dc4e4f3f8b0c8e0d52af86d94450f3eaab4 @johnbender johnbender committed Jun 5, 2012
Showing with 10 additions and 6 deletions.
  1. +7 −4 build/config.js
  2. +2 −1 build/tasks/css.js
  3. +1 −1 grunt.js
View
@@ -156,7 +156,9 @@ module.exports = function( grunt ) {
// depends on git commands (eg ver.min, ver.header)
ver: {
official: grunt.file.read( 'version.txt' ).replace(/\n/, ''),
- min: "/*! jQuery Mobile v<%= build_sha %> jquerymobile.com | jquery.org/license !*/"
+ min: '/*! jQuery Mobile v<%= build_sha %> jquerymobile.com | jquery.org/license !*/',
+ gitLongSha: 'git log -1 --format=format:"Git Build: SHA1: %H <> Date: %cd"',
+ gitShortSha: 'git log -1 --format=format:"%H"'
},
shas: {},
@@ -211,11 +213,13 @@ module.exports = function( grunt ) {
grunt.registerTask( 'config:async', 'git hashes for output headers', function() {
var done = this.async(), global = grunt.config.get( 'global' );
- child_process.exec( 'git log -1 --format=format:"Git Build: SHA1: %H <> Date: %cd"', function( err, stdout, stderr ){
+ // Get the long form sha output for inclusion in the non minified js and css
+ child_process.exec( global.ver.gitLongSha, function( err, stdout, stderr ){
global.shas.build_sha = stdout;
global.ver.min = grunt.template.process( global.ver.min, global.shas );
- child_process.exec( 'git log -1 --format=format:"%H"', function( err, stdout, stderr ) {
+ // Get the short form sha output for inclusion in the minified js and css
+ child_process.exec( global.ver.gitShortSha, function( err, stdout, stderr ) {
global.shas.head_sha = stdout;
// NOTE not using a template here because the Makefile depends on the v@VERSION
@@ -233,7 +237,6 @@ module.exports = function( grunt ) {
grunt.registerTask( 'config:test', 'glob all the test files', function() {
var done = this.async(), test_paths, server_paths = [], env = process.env;
-
// TODO move the glob to a legit config or pull the one from the qunit config
test_paths = glob.glob( 'tests/unit/*/' );
test_paths = test_paths.concat( glob.glob('tests/unit/**/*-tests.html') );
View
@@ -49,6 +49,7 @@ module.exports = function( grunt ) {
});
});
- // NOTE the progression of events is not obvious from the above compile -> concat x 3 -> min all -> cleanup the compiled stuff
+ // NOTE the progression of events is not obvious from the above
+ // compile -> concat x 3 -> min all -> cleanup the compiled stuff
grunt.registerTask( 'css', 'custom_init config:async css:compile concat:regular concat:structure concat:theme cssmin css:cleanup' );
};
View
@@ -14,5 +14,5 @@ module.exports = function( grunt ) {
grunt.registerTask('test', 'config:test qunit');
// load the project's default tasks
- grunt.loadTasks( path.join('build', 'tasks') );
+ grunt.loadTasks( 'build/tasks');
};

0 comments on commit 49958dc

Please sign in to comment.