cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject git commit: [CB-4526] call clean before build ALWAYS
Date Fri, 13 Sep 2013 21:57:06 GMT
Updated Branches:
  refs/heads/master 7944b671c -> 8d17f2a40


[CB-4526] call clean before build ALWAYS


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/8d17f2a4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/8d17f2a4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/8d17f2a4

Branch: refs/heads/master
Commit: 8d17f2a40f54db428a0c291abaab7f65cc1c73fb
Parents: 7944b67
Author: purplecabbage <purplecabbage@gmail.com>
Authored: Fri Sep 13 14:56:54 2013 -0700
Committer: purplecabbage <purplecabbage@gmail.com>
Committed: Fri Sep 13 14:56:54 2013 -0700

----------------------------------------------------------------------
 wp7/template/cordova/lib/build.js | 22 +++++++++++++---------
 wp8/template/cordova/lib/build.js | 22 +++++++++++++---------
 2 files changed, 26 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/8d17f2a4/wp7/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/build.js b/wp7/template/cordova/lib/build.js
index 32ff937..bd7c494 100644
--- a/wp7/template/cordova/lib/build.js
+++ b/wp7/template/cordova/lib/build.js
@@ -79,7 +79,7 @@ function is_cordova_project(path) {
         var proj_files = new Enumerator(proj_folder.Files);
         for (;!proj_files.atEnd(); proj_files.moveNext()) {
             if (fso.GetExtensionName(proj_files.item()) == 'csproj') {
-                return true;  
+                return true;
             }
         }
     }
@@ -101,14 +101,17 @@ function get_solution_name(path) {
 
 // builds the project and .xap in release mode
 function build_xap_release(path) {
+
+    exec_verbose('%comspec% /c "' + path + '\\cordova\\clean"');
+
     Log("Building Cordova-WP7 Project:");
     Log("\tConfiguration : Release");
     Log("\tDirectory : " + path);
-    
+
     wscript_shell.CurrentDirectory = path;
     var cmd = 'msbuild "' + get_solution_name(path) + '" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Release';
     exec_verbose(cmd);
-    
+
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Release')) {
         var out_folder = fso.GetFolder(path + '\\Bin\\Release');
@@ -116,7 +119,7 @@ function build_xap_release(path) {
         for (;!out_files.atEnd(); out_files.moveNext()) {
             if (fso.GetExtensionName(out_files.item()) == 'xap') {
                 Log("BUILD SUCCESS.");
-                return;  
+                return;
             }
         }
     }
@@ -126,14 +129,17 @@ function build_xap_release(path) {
 
 // builds the project and .xap in debug mode
 function build_xap_debug(path) {
+
+    exec_verbose('%comspec% /c "' + path + '\\cordova\\clean"');
+
     Log("Building Cordova-WP7 Project:");
     Log("\tConfiguration : Debug");
     Log("\tDirectory : " + path);
-    
+
     wscript_shell.CurrentDirectory = path;
     var cmd = 'msbuild "' + get_solution_name(path) + '" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Debug';
     exec_verbose(cmd);
-    
+
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Debug')) {
         var out_folder = fso.GetFolder(path + '\\Bin\\Debug');
@@ -141,7 +147,7 @@ function build_xap_debug(path) {
         for (;!out_files.atEnd(); out_files.moveNext()) {
             if (fso.GetExtensionName(out_files.item()) == 'xap') {
                 Log("BUILD SUCCESS.");
-                return;  
+                return;
             }
         }
     }
@@ -172,11 +178,9 @@ if (args.Count() > 0) {
         }
 
         if (args(0) == "--debug" || args(0) == "-d") {
-            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\clean"');
             build_xap_debug(ROOT);
         }
         else if (args(0) == "--release" || args(0) == "-r") {
-            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\clean"');
             build_xap_release(ROOT);
         }
         else {

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/8d17f2a4/wp8/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/build.js b/wp8/template/cordova/lib/build.js
index 31fc4ce..2c6406a 100644
--- a/wp8/template/cordova/lib/build.js
+++ b/wp8/template/cordova/lib/build.js
@@ -79,7 +79,7 @@ function is_cordova_project(path) {
         var proj_files = new Enumerator(proj_folder.Files);
         for (;!proj_files.atEnd(); proj_files.moveNext()) {
             if (fso.GetExtensionName(proj_files.item()) == 'csproj') {
-                return true;  
+                return true;
             }
         }
     }
@@ -101,14 +101,17 @@ function get_solution_name(path) {
 
 // builds the project and .xap in release mode
 function build_xap_release(path) {
+
+    exec_verbose('%comspec% /c "' + path + '\\cordova\\clean"');
+
     Log("Building Cordova-WP8 Project:");
     Log("\tConfiguration : Release");
     Log("\tDirectory : " + path);
-    
+
     wscript_shell.CurrentDirectory = path;
     var cmd = 'msbuild "' + get_solution_name(path) + '" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Release';
     exec_verbose(cmd);
-    
+
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Release')) {
         var out_folder = fso.GetFolder(path + '\\Bin\\Release');
@@ -116,7 +119,7 @@ function build_xap_release(path) {
         for (;!out_files.atEnd(); out_files.moveNext()) {
             if (fso.GetExtensionName(out_files.item()) == 'xap') {
                 Log("BUILD SUCCESS.");
-                return;  
+                return;
             }
         }
     }
@@ -126,14 +129,17 @@ function build_xap_release(path) {
 
 // builds the project and .xap in debug mode
 function build_xap_debug(path) {
+
+    exec_verbose('%comspec% /c "' + path + '\\cordova\\clean"');
+
     Log("Building Cordova-WP8 Project:");
     Log("\tConfiguration : Debug");
     Log("\tDirectory : " + path);
-    
+
     wscript_shell.CurrentDirectory = path;
     var cmd = 'msbuild "' + get_solution_name(path) + '" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Debug';
     exec_verbose(cmd);
-    
+
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Debug')) {
         var out_folder = fso.GetFolder(path + '\\Bin\\Debug');
@@ -141,7 +147,7 @@ function build_xap_debug(path) {
         for (;!out_files.atEnd(); out_files.moveNext()) {
             if (fso.GetExtensionName(out_files.item()) == 'xap') {
                 Log("BUILD SUCCESS.");
-                return;  
+                return;
             }
         }
     }
@@ -172,11 +178,9 @@ if (args.Count() > 0) {
         }
 
         if (args(0) == "--debug" || args(0) == "-d") {
-            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\clean"');
             build_xap_debug(ROOT);
         }
         else if (args(0) == "--release" || args(0) == "-r") {
-            exec_verbose('%comspec% /c "' + ROOT + '\\cordova\\clean"');
             build_xap_release(ROOT);
         }
         else {


Mime
View raw message