diff --git a/README.md b/README.md index d8ef9760a..ef1bef061 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ To compile the browserify version of the js for just one platform, run: grunt compile-browserify:android --platformVersion=3.6.0 - For integration, see the 'Integration' section below. ## Known Issues diff --git a/tasks/lib/bundle-browserify.js b/tasks/lib/bundle-browserify.js index 138d62701..668d1e947 100644 --- a/tasks/lib/bundle-browserify.js +++ b/tasks/lib/bundle-browserify.js @@ -29,7 +29,7 @@ module.exports = function bundle(platform, debug, commitId, platformVersion) { var b = browserify({debug: debug}); // XXX plugin_list is not present at this stage b.ignore(path.join(root, 'src', 'common', 'plugin_list')); - + b.transform(require_tr.transform); b.add(path.join(root, 'src', platform, 'exec.js')); diff --git a/tasks/lib/bundle.js b/tasks/lib/bundle.js index b68eacfc9..686fa778c 100644 --- a/tasks/lib/bundle.js +++ b/tasks/lib/bundle.js @@ -29,7 +29,7 @@ module.exports = function bundle(platform, debug, commitId, platformVersion) { var scripts = collectFiles(path.join('src', 'scripts')); modules[''] = path.join('src', 'cordova.js'); copyProps(modules, collectFiles(path.join('src', platform))); - + if (platform === 'test') { // Add any platform-specific modules that have tests to the test bundle. var testFilesPath = path.join('src', 'android', 'android'); @@ -46,6 +46,7 @@ module.exports = function bundle(platform, debug, commitId, platformVersion) { // write header output.push('/*', fs.readFileSync(licensePath, 'utf8'), '*/'); output.push(';(function() {'); + output.push("var PLATFORM_VERSION_BUILD_LABEL = '" + platformVersion + "';"); // write initial scripts diff --git a/tasks/lib/compute-commit-id.js b/tasks/lib/compute-commit-id.js index a4c4765b9..d81b1d531 100644 --- a/tasks/lib/compute-commit-id.js +++ b/tasks/lib/compute-commit-id.js @@ -35,6 +35,7 @@ module.exports = function computeCommitId(callback, cachedGitVersion) { var gitPath = 'git'; var args = 'rev-list HEAD --max-count=1'; childProcess.exec(gitPath + ' ' + args, {cwd:cordovaJSDir}, function(err, stdout, stderr) { + var isWindows = process.platform.slice(0, 3) == 'win'; if (err && isWindows) { gitPath = '"' + path.join(process.env['ProgramFiles'], 'Git', 'bin', 'git.exe') + '"';