You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/08/30 01:59:02 UTC
[4/7] js commit: CB-7219: cordova.version now outputs same value as
cordova.platformVersion
CB-7219: cordova.version now outputs same value as cordova.platformVersion
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/5e9ff22a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/5e9ff22a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/5e9ff22a
Branch: refs/heads/cb-7219
Commit: 5e9ff22aef03b77e86d0d99bbc2cdbc53a71ca8c
Parents: 582a984
Author: Steven Gill <st...@gmail.com>
Authored: Tue Aug 12 11:11:31 2014 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Mon Aug 18 17:09:08 2014 -0700
----------------------------------------------------------------------
README.md | 9 +++++++--
VERSION | 1 -
src/cordova.js | 2 +-
src/cordova_b.js | 2 +-
tasks/compile.js | 2 +-
tasks/lib/bundle.js | 1 -
tasks/lib/compute-commit-id.js | 2 --
tasks/lib/write-license-header.js | 2 +-
8 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5e9ff22a/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index b188caa..d8ef976 100644
--- a/README.md
+++ b/README.md
@@ -56,13 +56,18 @@ Then from the repository root run:
grunt --platformVersion=3.6.0
-To do just one platform, run:
+To compile the js for just one platform, run:
grunt compile:android --platformVersion=3.6.0
-To create the browserify version, run:
+To create the browserify version of the js, run:
grunt compile-browserify --platformVersion=3.6.0
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5e9ff22a/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 7c69a55..0000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-3.7.0
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5e9ff22a/src/cordova.js
----------------------------------------------------------------------
diff --git a/src/cordova.js b/src/cordova.js
index 4d16516..3602b70 100644
--- a/src/cordova.js
+++ b/src/cordova.js
@@ -93,7 +93,7 @@ function createEvent(type, data) {
var cordova = {
define:define,
require:require,
- //version:CORDOVA_JS_BUILD_LABEL,
+ version:PLATFORM_VERSION_BUILD_LABEL,
platformVersion:PLATFORM_VERSION_BUILD_LABEL,
platformId:platform.id,
/**
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5e9ff22a/src/cordova_b.js
----------------------------------------------------------------------
diff --git a/src/cordova_b.js b/src/cordova_b.js
index 29177e2..3a9ed6d 100644
--- a/src/cordova_b.js
+++ b/src/cordova_b.js
@@ -92,7 +92,7 @@ function createEvent(type, data) {
var cordova = {
platformVersion:PLATFORM_VERSION_BUILD_LABEL,
- //version:CORDOVA_JS_BUILD_LABEL,
+ version:PLATFORM_VERSION_BUILD_LABEL,
require: function(module) {
if(module === "cordova/exec") {
return cordova.exec;
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5e9ff22a/tasks/compile.js
----------------------------------------------------------------------
diff --git a/tasks/compile.js b/tasks/compile.js
index 0e8392e..849e909 100644
--- a/tasks/compile.js
+++ b/tasks/compile.js
@@ -36,7 +36,7 @@ module.exports = function(grunt) {
});
if(!platformVersion){
console.log('please add a platform version flag and value');
- console.log('ex: grunt compile-browserify --platformVersion=3.6.0');
+ console.log('ex: grunt compile --platformVersion=3.6.0');
throw new Error("platformVersion is required!");
}
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5e9ff22a/tasks/lib/bundle.js
----------------------------------------------------------------------
diff --git a/tasks/lib/bundle.js b/tasks/lib/bundle.js
index 3937c51..d3282ec 100644
--- a/tasks/lib/bundle.js
+++ b/tasks/lib/bundle.js
@@ -47,7 +47,6 @@ module.exports = function bundle(platform, debug, commitId, platformVersion) {
// write header
output.push('/*', fs.readFileSync(licensePath, 'utf8'), '*/');
output.push(';(function() {');
- //output.push("var CORDOVA_JS_BUILD_LABEL = '" + commitId + "';");
output.push("var PLATFORM_VERSION_BUILD_LABEL = '" + platformVersion + "';");
// write initial scripts
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5e9ff22a/tasks/lib/compute-commit-id.js
----------------------------------------------------------------------
diff --git a/tasks/lib/compute-commit-id.js b/tasks/lib/compute-commit-id.js
index d768340..8471a05 100644
--- a/tasks/lib/compute-commit-id.js
+++ b/tasks/lib/compute-commit-id.js
@@ -28,8 +28,6 @@ module.exports = function computeCommitId(callback, cachedGitVersion) {
return;
}
- var versionFileId = fs.readFileSync('VERSION', { encoding: 'utf8' }).trim();
-
if (fs.existsSync('.git')) {
var gitPath = 'git';
var args = 'rev-list HEAD --max-count=1';
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5e9ff22a/tasks/lib/write-license-header.js
----------------------------------------------------------------------
diff --git a/tasks/lib/write-license-header.js b/tasks/lib/write-license-header.js
index c8d4345..8d7e24e 100644
--- a/tasks/lib/write-license-header.js
+++ b/tasks/lib/write-license-header.js
@@ -9,8 +9,8 @@ module.exports = function(outStream, platform, commitId, platformVersion) {
outStream.write("// Platform: " + platform + "\n", 'utf8');
outStream.write("// " + commitId + "\n", 'utf8');
+ outStream.write("// browserify" + "\n", 'utf8');
outStream.write(licenseText, 'utf8');
- //outStream.write("var CORDOVA_JS_BUILD_LABEL = '" + commitId + "';\n", 'utf8');
outStream.write("var PLATFORM_VERSION_BUILD_LABEL = '" + platformVersion + "';\n", 'utf8');
outStream.write("var define = {moduleMap: []};\n", 'utf8');