@@ -25,8 +25,9 @@ echo set SKIP_UPDATE_CHECKOUT=%SKIP_UPDATE_CHECKOUT%>> %TEMP%\call-build.cmd
25
25
echo set REPO_SCHEME=%REPO_SCHEME% >> %TEMP% \call-build.cmd
26
26
echo " %~f0 " >> %TEMP% \call-build.cmd
27
27
start /i /b /wait cmd.exe /env=default /c " %TEMP% \call-build.cmd"
28
+ set ec = %errorlevel%
28
29
del %TEMP% \call-build.cmd
29
- exit /b
30
+ exit /b %ec%
30
31
31
32
:Start
32
33
@@ -43,7 +44,7 @@ set BuildRoot=%SourceRoot%\build
43
44
44
45
md %BuildRoot%
45
46
subst T: /d
46
- subst T: %BuildRoot% || (exit /b)
47
+ subst T: %BuildRoot% || (exit /b 1 )
47
48
set BuildRoot = T:
48
49
49
50
:: Identify the PackageRoot
@@ -70,7 +71,7 @@ if "%TestArg:~-1%"=="," (set TestArg=%TestArg:~0,-1%) else (set TestArg= )
70
71
set SkipPackagingArg = -SkipPackaging
71
72
if not " %SKIP_PACKAGING% " == " 1" set " SkipPackagingArg = "
72
73
73
- call :CloneRepositories || (exit /b)
74
+ call :CloneRepositories || (exit /b 1 )
74
75
75
76
:: We only have write access to BuildRoot, so use that as the image root.
76
77
powershell.exe -ExecutionPolicy RemoteSigned -File %~dp0 build.ps1 ^
@@ -80,7 +81,7 @@ powershell.exe -ExecutionPolicy RemoteSigned -File %~dp0build.ps1 ^
80
81
-BuildType %CMAKE_BUILD_TYPE% ^
81
82
%SkipPackagingArg% ^
82
83
%TestArg% ^
83
- -Stage %PackageRoot%
84
+ -Stage %PackageRoot% || (exit /b 1)
84
85
85
86
:: Clean up the module cache
86
87
rd /s /q %LocalAppData% \clang\ModuleCache
@@ -109,7 +110,7 @@ set "args=%args% --skip-repository swift-integration-tests"
109
110
set " args = %args% --skip-repository swift-stress-tester"
110
111
set " args = %args% --skip-repository swift-xcode-playground-support"
111
112
112
- call " %SourceRoot% \swift\utils\update-checkout.cmd" %args% --clone --skip-history --github-comment " %ghprbCommentBody% "
113
+ call " %SourceRoot% \swift\utils\update-checkout.cmd" %args% --clone --skip-history --reset-to-remote -- github-comment " %ghprbCommentBody% "
113
114
114
115
goto :eof
115
116
endlocal
0 commit comments