aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuqian Yang <crupest@outlook.com>2018-09-25 15:47:35 +0000
committerYuqian Yang <crupest@outlook.com>2018-09-25 15:47:35 +0000
commitcfa9c01cf55c35fdef01cb25041d1d9029dd44c1 (patch)
treea25d379714aa627f69e12246950c812cba88ba1a
parentc8ddc4bc7d96b67aac9526089ade64b31007fa3e (diff)
parentc4412bd6f95850ddd05c17fb6c2a618390ca87b5 (diff)
downloadcru-cfa9c01cf55c35fdef01cb25041d1d9029dd44c1.tar.gz
cru-cfa9c01cf55c35fdef01cb25041d1d9029dd44c1.tar.bz2
cru-cfa9c01cf55c35fdef01cb25041d1d9029dd44c1.zip
Merge branch 'ci' into 'master'
Update build script. Only rebuild when build failed. See merge request crupest/CruUI!6
-rw-r--r--script/build.ps112
1 files changed, 9 insertions, 3 deletions
diff --git a/script/build.ps1 b/script/build.ps1
index d236421c..13f6831d 100644
--- a/script/build.ps1
+++ b/script/build.ps1
@@ -1,4 +1,5 @@
-function CheckLastExitCode {
+function CheckLastExitCode
+{
if ($LASTEXITCODE -ne 0)
{
exit $LASTEXITCODE
@@ -11,5 +12,10 @@ vcpkg.exe install folly:x64-windows fmt:x64-windows
vcpkg.exe integrate install
& CheckLastExitCode
-& "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" CruUI.sln /target:Rebuild /p:Platform=x64 /p:Configuration=Debug
-& CheckLastExitCode
+& "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" CruUI.sln /target:Build /p:Platform=x64 /p:Configuration=Debug
+
+if ($LASTEXITCODE -ne 0)
+{
+ & "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" CruUI.sln /target:Rebuild /p:Platform=x64 /p:Configuration=Debug
+ & CheckLastExitCode
+}