From 263a0b551837a24ff2b3326c2924e93a3c45ac5b Mon Sep 17 00:00:00 2001 From: Siddharth Kannan Date: Wed, 19 Oct 2016 00:28:00 +0530 Subject: [PATCH] upload: Fix zip path before uploading to S3 - Ensures that the package.json's default directory for the code is considered before suggesting the zip path Signed-off-by: Siddharth Kannan --- lib/upload.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/upload.js b/lib/upload.js index a74eab3..a3c2625 100644 --- a/lib/upload.js +++ b/lib/upload.js @@ -95,7 +95,10 @@ Upload.uploadToS3 = function uploadToS3(appDirectory, keyInfo) { log.debug('Uploading zip file to S3'); var proxy = Utils.getProxy(); - var zipFile = path.join(appDirectory, TEMP_FILENAME); + var project = IonicProject.load(appDirectory); + var documentRoot = project.get('documentRoot') || 'www'; + log.debug("Document root is set to: " + documentRoot); + var zipFile = path.join(appDirectory, documentRoot) + ".zip"; // Now we upload with the signed URL the dash returned log.debug(zipFile);