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/09/28 11:39:20 UTC

ios commit: CB-9698 Add rsync error handling in ios copy-www-build-step.js

Repository: cordova-ios
Updated Branches:
  refs/heads/master 13edbfc63 -> 973517e64


CB-9698 Add rsync error handling in ios copy-www-build-step.js


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/973517e6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/973517e6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/973517e6

Branch: refs/heads/master
Commit: 973517e64c75f46ba0e5779ce7286179b728ac3f
Parents: 13edbfc
Author: daserge <v-...@microsoft.com>
Authored: Thu Sep 24 12:41:11 2015 +0300
Committer: daserge <v-...@microsoft.com>
Committed: Thu Sep 24 12:41:11 2015 +0300

----------------------------------------------------------------------
 bin/templates/scripts/cordova/lib/copy-www-build-step.js | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/973517e6/bin/templates/scripts/cordova/lib/copy-www-build-step.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/copy-www-build-step.js b/bin/templates/scripts/cordova/lib/copy-www-build-step.js
index 811da02..7caa200 100644
--- a/bin/templates/scripts/cordova/lib/copy-www-build-step.js
+++ b/bin/templates/scripts/cordova/lib/copy-www-build-step.js
@@ -45,7 +45,7 @@ try {
     fs.statSync(srcDir);
 } catch (e) {
     console.error('Path does not exist: ' + srcDir);
-    process.exit(1);
+    process.exit(2);
 }
 
 // Code signing files must be removed or else there are
@@ -56,12 +56,17 @@ shell.rm('-rf', path.join(dstDir, 'PkgInfo'));
 shell.rm('-rf', path.join(dstDir, 'embedded.mobileprovision'));
 
 // Copy www dir recursively
+var code;
 if(!!COPY_HIDDEN) {
-    shell.exec('rsync -Lra "' + srcDir + '" "' + dstDir + '"');
+    code = shell.exec('rsync -Lra "' + srcDir + '" "' + dstDir + '"').code;
 } else {
-    shell.exec('rsync -Lra --exclude="- .*" "' + srcDir + '" "' + dstDir + '"');
+    code = shell.exec('rsync -Lra --exclude="- .*" "' + srcDir + '" "' + dstDir + '"').code;
 }
 
+if(code !== 0) {
+    console.error('Error occured on copying www. Code: ' + code);
+    process.exit(3);
+}
 
 // Copy the config.xml file.
 shell.cp('-f', path.join(path.dirname(PROJECT_FILE_PATH), path.basename(PROJECT_FILE_PATH, '.xcodeproj'), 'config.xml'),


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org