Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3F72911E78 for ; Wed, 21 May 2014 17:19:52 +0000 (UTC) Received: (qmail 38033 invoked by uid 500); 21 May 2014 17:19:52 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 38012 invoked by uid 500); 21 May 2014 17:19:52 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 38005 invoked by uid 99); 21 May 2014 17:19:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 17:19:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E155199CDB9; Wed, 21 May 2014 17:19:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org Date: Wed, 21 May 2014 17:19:51 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: Fix corner-case in harness-push & add missing usage examples Repository: cordova-app-harness Updated Branches: refs/heads/master 4a366039f -> a2ae35550 Fix corner-case in harness-push & add missing usage examples Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/3a815ad3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/3a815ad3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/3a815ad3 Branch: refs/heads/master Commit: 3a815ad33c2f61e997b531656243dc6ac62faa2f Parents: 4a36603 Author: Andrew Grieve Authored: Wed May 21 13:18:22 2014 -0400 Committer: Andrew Grieve Committed: Wed May 21 13:18:22 2014 -0400 ---------------------------------------------------------------------- harness-push/harness-push.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/3a815ad3/harness-push/harness-push.js ---------------------------------------------------------------------- diff --git a/harness-push/harness-push.js b/harness-push/harness-push.js index 07e6ff1..83f3367 100755 --- a/harness-push/harness-push.js +++ b/harness-push/harness-push.js @@ -76,7 +76,6 @@ function discoverAppId(dir) { return appId; } -// Takes a Node-style callback: function(err). exports.push = function(target, dir, pretend) { var appId = discoverAppId(dir); var appType = 'cordova'; @@ -85,7 +84,6 @@ exports.push = function(target, dir, pretend) { .then(function(result) { var derivedWwwDir = getDerivedWwwDir(dir, result.body['platform']); var derivedConfigXmlPath = getDerivedConfigXmlPath(dir, result.body['platform']); - console.log(derivedConfigXmlPath); var cordovaPluginsPath = path.join(derivedWwwDir, 'cordova_plugins.js'); if (!fs.existsSync(cordovaPluginsPath)) { throw new Error('Could not find: ' + cordovaPluginsPath); @@ -131,7 +129,7 @@ function buildAssetManifest(dir, configXmlPath) { var ret = Object.create(null); for (var i = 0; i < fileList.length; ++i) { // TODO: convert windows slash to unix slash here. - var appPath = 'www' + fileList[i].slice(dir.length); + var appPath = 'www/' + fileList[i].slice(dir == '.' ? 0 : dir.length + 1); ret[appPath] = { path: appPath, realPath: fileList[i], @@ -360,11 +358,14 @@ function parseArgs(argv) { } function usage() { - console.log('Usage: harness-push push path/to/chrome_app --target=IP_ADDRESS:PORT'); + console.log('Usage: harness-push push path/to/app --target=IP_ADDRESS:PORT'); console.log('Usage: harness-push menu'); console.log('Usage: harness-push eval "alert(1)"'); console.log('Usage: harness-push info'); console.log('Usage: harness-push launch [appId]'); + console.log('Usage: harness-push assetmanifest [appId]'); + console.log('Usage: harness-push delete appId'); + console.log('Usage: harness-push deleteall'); console.log(); console.log('--target defaults to localhost:2424'); console.log('To deploy to Android over USB, use: adb forward tcp:2424 tcp:2424');