aboutsummaryrefslogtreecommitdiff
path: root/script/build.ps1
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-25 23:43:53 +0800
committercrupest <crupest@outlook.com>2018-09-25 23:43:53 +0800
commitc4412bd6f95850ddd05c17fb6c2a618390ca87b5 (patch)
treea25d379714aa627f69e12246950c812cba88ba1a /script/build.ps1
parentc8ddc4bc7d96b67aac9526089ade64b31007fa3e (diff)
downloadcru-c4412bd6f95850ddd05c17fb6c2a618390ca87b5.tar.gz
cru-c4412bd6f95850ddd05c17fb6c2a618390ca87b5.tar.bz2
cru-c4412bd6f95850ddd05c17fb6c2a618390ca87b5.zip
Update build script. Only rebuild when build failed.
Diffstat (limited to 'script/build.ps1')
-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
+}