I have this batch that builds some projects using msbuild.
What I want to do is to skip building my-last.proj if any of the above builds fail: my-proj1.proj to my-proj5.proj using environment variables.
I'm sure that there is another cleaner way to do this, but so far I just can't figure it out.
msbuild /target:Win32 my-proj1.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED32=1
)
msbuild /target:X64 my-proj1.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED64=1
)
msbuild /target:ManagedWin32 my-proj1.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED32=1
)
msbuild /target:ManagedX64 my-proj1.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED64=1
)
msbuild /target:Win32 my-proj2.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED32=1
)
msbuild /target:X64 my-proj2.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED64=1
)
msbuild /target:Win32 my-proj3.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED32=1
)
msbuild /target:Win32 my-proj4.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED32=1
)
msbuild /target:Win32 my-proj5.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED32=1
)
IF NOT "%FAILED32%" == "1" (
msbuild /target:setup32 my-last.proj
)
msbuild /target:X64 my-proj3.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED64=1
)
msbuild /target:X64 my-proj4.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED64=1
)
msbuild /target:X64 my-proj5.proj
IF NOT ERRORLEVEL 0 (
set /p BUILDFAILED64=1
)
IF NOT "%FAILED64%" == "1" (
msbuild /target:setup64 my-last.proj
)
Does anyone have any ideas?