From e58cb88d98c260b5973cf57f9a4b7a850f5e6f2d Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Tue, 29 Jun 2010 06:00:11 +0000 Subject: [PATCH] Fixe a deadlock in builder --- Builder/IISMainHandler/build.txt | 2 +- Builder/IISMainHandler/prebuild.bat | 3 ++- Builder/IISUploadHandler/build.txt | 2 +- Builder/Program.cs | 11 +++++++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 511fa83..b14de3a 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -414 \ No newline at end of file +421 \ No newline at end of file diff --git a/Builder/IISMainHandler/prebuild.bat b/Builder/IISMainHandler/prebuild.bat index 03320e2..a64059e 100644 --- a/Builder/IISMainHandler/prebuild.bat +++ b/Builder/IISMainHandler/prebuild.bat @@ -1,4 +1,5 @@ @echo off "C:\Program Files\7-Zip\7z.exe" a Templates.7z ..\..\templates\* -xr!.svn "C:\Program Files\7-Zip\7z.exe" a Static.7z ..\..\static\* -xr!.svn -copy "C:\Program Files\7-Zip\7z.exe" 7z.exe \ No newline at end of file +copy "C:\Program Files\7-Zip\7z.exe" 7z.exe +exit diff --git a/Builder/IISUploadHandler/build.txt b/Builder/IISUploadHandler/build.txt index bc768da..2bab422 100644 --- a/Builder/IISUploadHandler/build.txt +++ b/Builder/IISUploadHandler/build.txt @@ -1 +1 @@ -146 \ No newline at end of file +157 \ No newline at end of file diff --git a/Builder/Program.cs b/Builder/Program.cs index 60dc462..fe6670c 100644 --- a/Builder/Program.cs +++ b/Builder/Program.cs @@ -16,10 +16,13 @@ namespace Builder { info.WorkingDirectory = (new FileInfo(filename)).Directory.FullName; info.UseShellExecute = false; info.RedirectStandardOutput = true; + StringBuilder builder = new StringBuilder(); using(Process process = Process.Start(info)) { + builder.Append(process.StandardOutput.ReadToEnd()); process.WaitForExit(); - return process.StandardOutput.ReadToEnd(); + builder.Append(process.StandardOutput.ReadToEnd()); } + return builder.ToString(); } static void Main(string[] args) { @@ -45,7 +48,11 @@ namespace Builder { string postbuildCommands = fullPath + "postbuild.bat"; string buildNumberFile = fullPath + "build.txt"; - if(File.Exists(prebuildCommands)) Console.WriteLine(runBatFile(prebuildCommands)); + if(File.Exists(prebuildCommands)) { + Console.WriteLine(">prebuild"); + Console.WriteLine(runBatFile(prebuildCommands)); + Console.WriteLine("