You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/07/18 22:44:40 UTC
[1/2] git commit: Fixes dependency fetching to work with
subdirectories. Also allows subdirectories within platform tags
Updated Branches:
refs/heads/master fef05584f -> 9caee42ee
Fixes dependency fetching to work with subdirectories. Also allows subdirectories within platform tags
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/dd31b393
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/dd31b393
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/dd31b393
Branch: refs/heads/master
Commit: dd31b39367bcb1c13324944557a190e4cf8fd023
Parents: fef0558
Author: Jeffrey Heifetz <jh...@blackberry.com>
Authored: Wed Jul 17 21:55:22 2013 -0400
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jul 18 13:40:17 2013 -0700
----------------------------------------------------------------------
src/install.js | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/dd31b393/src/install.js
----------------------------------------------------------------------
diff --git a/src/install.js b/src/install.js
index c1b5d17..13aa9bb 100644
--- a/src/install.js
+++ b/src/install.js
@@ -51,7 +51,7 @@ function possiblyFetch(actions, platform, project_dir, id, plugins_dir, options,
// Check that the plugin has already been fetched.
if (!fs.existsSync(plugin_dir)) {
// if plugin doesnt exist, use fetch to get it.
- require('../plugman').fetch(id, plugins_dir, { link: false, subdir: '.', git_ref: options.git_ref }, function(err, plugin_dir) {
+ require('../plugman').fetch(id, plugins_dir, { link: false, subdir: options.subdir, git_ref: options.git_ref }, function(err, plugin_dir) {
if (err) {
callback(err);
} else {
@@ -92,8 +92,8 @@ function runInstall(actions, platform, project_dir, plugin_dir, plugins_dir, opt
if (callback) callback();
return;
}
-
- // checking engine
+
+ // checking engine
// will there be a case for multiple engine support?
var versionPath = path.join(project_dir, 'cordova', 'version');
if (fs.existsSync(versionPath)) {
@@ -111,14 +111,14 @@ function runInstall(actions, platform, project_dir, plugin_dir, plugins_dir, opt
engines.forEach(function(engine){
if(engine.attrib["name"].toLowerCase() === "cordova"){
var engineVersion = engine.attrib["version"];
- // clean only versionScript.output since semver.clean strips out
+ // clean only versionScript.output since semver.clean strips out
// the gt and lt operators
if(current_version == 'dev' || semver.satisfies(current_version, engineVersion)){
// engine ok!
} else {
var err = new Error('Plugin doesn\'t support this project\'s Cordova version. Project version: ' + current_version + ', failed version requirement: ' + engineVersion);
if (callback) return callback(err);
- else throw err;
+ else throw err;
}
} else {
// check for other engines? worklight phonegap etc
@@ -149,7 +149,8 @@ function runInstall(actions, platform, project_dir, plugin_dir, plugins_dir, opt
}
// Check for dependencies, (co)recurse to install each one
- var dependencies = plugin_et.findall('dependency');
+ var dependencies = plugin_et.findall('dependency') || [];
+ dependencies = dependencies.concat(plugin_et.findall('./platform[@name="'+platform+'"]/dependency'));
if (dependencies && dependencies.length) {
require('../plugman').emit('log', 'Dependencies detected, iterating through them...');
var end = n(dependencies.length, function() {
@@ -171,7 +172,7 @@ function runInstall(actions, platform, project_dir, plugin_dir, plugins_dir, opt
if (dep_url == '.') {
// Look up the parent plugin's fetch metadata and determine the correct URL.
var fetchdata = require('./util/metadata').get_fetch_metadata(plugin_dir);
-
+
if (!fetchdata || !(fetchdata.source && fetchdata.source.type)) {
var err = new Error('No fetch metadata found for ' + plugin_id + '. Cannot install relative dependencies.');
if (callback) callback(err);
[2/2] git commit: 0.9.10. [CB-4292] fixes for plugman and fetching.
Posted by fi...@apache.org.
0.9.10. [CB-4292] fixes for plugman and fetching.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/9caee42e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/9caee42e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/9caee42e
Branch: refs/heads/master
Commit: 9caee42ee8669dd2fed629c212b61056fcacca12
Parents: dd31b39
Author: Fil Maj <ma...@gmail.com>
Authored: Thu Jul 18 13:43:48 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jul 18 13:43:48 2013 -0700
----------------------------------------------------------------------
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9caee42e/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 15179c6..5a6e55f 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"author": "Andrew Lunny <al...@gmail.com>",
"name": "plugman",
"description": "install/uninstall Cordova plugins",
- "version": "0.9.9",
+ "version": "0.9.10",
"repository": {
"type": "git",
"url": "git://git-wip-us.apache.org/repos/asf/cordova-plugman.git"