You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/03/11 11:18:34 UTC
cordova-lib git commit: CB-8633 BugFix: Support for urls to tarballs
was broken
Repository: cordova-lib
Updated Branches:
refs/heads/master 764c9cb12 -> f830e4651
CB-8633 BugFix: Support for urls to tarballs was broken
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/f830e465
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/f830e465
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/f830e465
Branch: refs/heads/master
Commit: f830e4651512040ef790e82a3b07495f163ec848
Parents: 764c9cb
Author: Omar Mefire <om...@microsoft.com>
Authored: Sun Mar 8 14:50:08 2015 -0700
Committer: Omar Mefire <om...@microsoft.com>
Committed: Sun Mar 8 14:50:08 2015 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/platform.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f830e465/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index c0116de..1e2adac 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -211,7 +211,15 @@ function downloadPlatform(projectRoot, platform, version, opts) {
return Q().then(function() {
if (cordova_util.isUrl(version)) {
events.emit('log', 'git cloning: ' + version);
- return lazy_load.git_clone(version);
+ return lazy_load.git_clone(version).fail(function(err){
+ // If it looks like a url, but cannot be cloned, try handling it differently.
+ // it's because it's a tarball of the form:
+ // - wp8@https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git;a=snapshot;h=3.7.0;sf=tgz
+ // - https://api.github.com/repos/msopenTech/cordova-browser/tarball/my-branch
+ events.emit('verbose', err.message);
+ events.emit('verbose', 'Cloning failed. Let\'s try handling it as a tarball');
+ return lazy_load.based_on_config(projectRoot, target, opts);
+ });
}
return lazy_load.based_on_config(projectRoot, target, opts);
}).then(function(libDir) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org