Updated Branches: refs/heads/CB-3604 be2970ef6 -> 7efef0c8a refs/heads/master ad135dd97 -> 773001d33
[CB-3604] target and create script mods for repo level target script create script copies target script and repo level targets.json to project level to support 1. additional targets added at project level without presence of repo 2. prevent breakage due to moving repo 3. allow easy migration of project to another location or system without breakage Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/4e8040dc Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/4e8040dc Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/4e8040dc Branch: refs/heads/CB-3604 Commit: 4e8040dc2a79b10dff7d03da8d52581aef69d188 Parents: be2970e Author: lorinbeer <[email protected]> Authored: Tue Jun 11 09:26:20 2013 -0700 Committer: lorinbeer <[email protected]> Committed: Tue Jun 11 09:26:20 2013 -0700 ---------------------------------------------------------------------- blackberry10/bin/create.js | 7 +++++++ blackberry10/bin/lib/target.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/4e8040dc/blackberry10/bin/create.js ---------------------------------------------------------------------- diff --git a/blackberry10/bin/create.js b/blackberry10/bin/create.js index b454d37..6264e87 100644 --- a/blackberry10/bin/create.js +++ b/blackberry10/bin/create.js @@ -38,6 +38,7 @@ var build, MODULES_PROJECT_DIR = path.join(__dirname, "..", "node_modules"), BOOTSTRAP_PROJECT_DIR = path.join(__dirname, "..", "framework", "bootstrap"), FRAMEWORK_LIB_PROJECT_DIR = path.join(__dirname, "..", "framework", "lib"), + BIN_DIR = path.join(__dirname), BUILD_DIR = path.join(__dirname, "build"), CORDOVA_JS_SRC = path.join(__dirname, "..", "javascript", "cordova.blackberry10.js"), update_dir = path.join(project_path, "lib", "cordova." + version), @@ -117,6 +118,12 @@ function copyFilesToProject() { wrench.mkdirSyncRecursive(project_path, 0777); wrench.copyDirSyncRecursive(TEMPLATE_PROJECT_DIR, project_path); + // copy repo level target tool to project + utils.copyFile(path.join(BIN_DIR, "target"), path.join(project_path, "cordova")); + utils.copyFile(path.join(BIN_DIR, "target.bat"), path.join(project_path, "cordova")); + utils.copyFile(path.join(BIN_DIR, "lib", "target.js"), path.join(project_path, "cordova", "lib")); + utils.copyFile(path.join(BIN_DIR, "lib", "targets.json"), path.join(project_path, "cordova", "lib")); + // change file permission for cordova scripts because ant copy doesn't preserve file permissions wrench.chmodSyncRecursive(path.join(project_path,"cordova"), 0700); http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/4e8040dc/blackberry10/bin/lib/target.js ---------------------------------------------------------------------- diff --git a/blackberry10/bin/lib/target.js b/blackberry10/bin/lib/target.js index d66d5ec..b099c3e 100644 --- a/blackberry10/bin/lib/target.js +++ b/blackberry10/bin/lib/target.js @@ -16,7 +16,7 @@ */ var path = require('path'), - propertiesFile = './targets.json', + propertiesFile = path.join(__dirname,'targets.json'), properties = require(propertiesFile), fs = require('fs'), commander = require('commander'),
