Fixe a deadlock in builder

main
Inga 🏳‍🌈 15 years ago
parent b76fc00c5b
commit e58cb88d98
  1. 2
      Builder/IISMainHandler/build.txt
  2. 3
      Builder/IISMainHandler/prebuild.bat
  3. 2
      Builder/IISUploadHandler/build.txt
  4. 11
      Builder/Program.cs

@ -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
copy "C:\Program Files\7-Zip\7z.exe" 7z.exe
exit

@ -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("<prebuild");
}
if(!File.Exists(buildNumberFile)) {
using(FileStream stream = File.Create(buildNumberFile)) {

Loading…
Cancel
Save