Fixe a deadlock in builder

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

@ -2,3 +2,4 @@
"C:\Program Files\7-Zip\7z.exe" a Templates.7z ..\..\templates\* -xr!.svn "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 "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.WorkingDirectory = (new FileInfo(filename)).Directory.FullName;
info.UseShellExecute = false; info.UseShellExecute = false;
info.RedirectStandardOutput = true; info.RedirectStandardOutput = true;
StringBuilder builder = new StringBuilder();
using(Process process = Process.Start(info)) { using(Process process = Process.Start(info)) {
builder.Append(process.StandardOutput.ReadToEnd());
process.WaitForExit(); process.WaitForExit();
return process.StandardOutput.ReadToEnd(); builder.Append(process.StandardOutput.ReadToEnd());
} }
return builder.ToString();
} }
static void Main(string[] args) { static void Main(string[] args) {
@ -45,7 +48,11 @@ namespace Builder {
string postbuildCommands = fullPath + "postbuild.bat"; string postbuildCommands = fullPath + "postbuild.bat";
string buildNumberFile = fullPath + "build.txt"; 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)) { if(!File.Exists(buildNumberFile)) {
using(FileStream stream = File.Create(buildNumberFile)) { using(FileStream stream = File.Create(buildNumberFile)) {

Loading…
Cancel
Save