cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [20/51] [abbrv] git commit: Allow version string to have 1, 2, 3, or 4 part numbers
Date Wed, 27 Nov 2013 22:27:19 GMT
Allow version string to have 1, 2, 3, or 4 part numbers


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/4f19c862
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/4f19c862
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/4f19c862

Branch: refs/heads/fireos
Commit: 4f19c86235045ff07aca19084128ce0c6b77cae2
Parents: 0364f0b
Author: SomaticIT <contact@somatic.fr>
Authored: Mon Nov 18 18:18:37 2013 +0100
Committer: SomaticIT <contact@somatic.fr>
Committed: Mon Nov 18 18:18:37 2013 +0100

----------------------------------------------------------------------
 src/metadata/windows8_parser.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4f19c862/src/metadata/windows8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/windows8_parser.js b/src/metadata/windows8_parser.js
index dce9fc7..62b129c 100644
--- a/src/metadata/windows8_parser.js
+++ b/src/metadata/windows8_parser.js
@@ -284,7 +284,13 @@ module.exports.prototype = {
 
     // Cordova default version format is not compatible with Windows 8
     fixConfigVersion: function (version) {
-        if (version.match(/^\d+\.\d+\.\d+$/)) {
+        if (version.match(/^\d+$/)) {
+            return version.concat(".0.0.0");
+        }
+        else if (version.match(/^\d+\.\d+$/)) {
+            return version.concat(".0.0");
+        }
+        else if (version.match(/^\d+\.\d+\.\d+$/)) {
             return version.concat(".0");
         }
         else if (version.match(/^\d+\.\d+\.\d+\.\d+$/)) {


Mime
View raw message