From de1cc6bb51b57f508fcab50c5c08ef0e840cb610 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 12 Feb 2019 20:22:28 +0000 Subject: [PATCH] Run debug & release builds in parallel --- build | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/build b/build index 8ded495..5abf787 100755 --- a/build +++ b/build @@ -55,6 +55,7 @@ function task_setup { check_command mono true; check_command msbuild true; check_command nuget true; + check_command mktemp true; task_end 0; } @@ -65,8 +66,33 @@ function task_build { task_end $?; task_begin "Building"; - execute msbuild; - execute msbuild /p:Configuration=Release; + debug_logfile="$(mktemp --suffix ".rhinoreminds.debug.log")"; + release_logfile="$(mktemp --suffix ".rhinoreminds.release.log")"; + ( + execute msbuild /consoleloggerparameters:ForceConsoleColor >"${debug_logfile}" 2>&1 + release_exit_code=$!; + ) & + ( + execute msbuild /consoleloggerparameters:ForceConsoleColor /p:Configuration=Release >"${release_logfile}" 2>&1 + debug_exit_code=$!; + ) & + + wait + + # FUTURE: Grab the + stage_begin "Debug compilation output"; + cat "${debug_logfile}"; + stage_end "${release_exit_code}"; + + stage_begin "Release compilation output"; + cat "${release_logfile}"; + stage_end "${debug_exit_code}"; + + echo ""; + + rm "${debug_logfile}" "${release_logfile}"; + + task_end $?; }