-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBuild.bat
More file actions
41 lines (33 loc) · 1.31 KB
/
Copy pathBuild.bat
File metadata and controls
41 lines (33 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
call :clean_all
call :check_prerequisites || (call :clean_all & goto :display_failure_message)
dotnet.exe build -c Release -p:Platform=x86 . || (call :clean_all & goto :display_failure_message)
dotnet.exe build -c Release -p:Platform=x64 . || (call :clean_all & goto :display_failure_message)
call :clean_temporary_files
goto :display_success_message
:check_prerequisites
where dotnet > nul 2>&1 || (echo ERROR: '.NET SDK' Was Not Found! & exit /b -1)
exit /b 0
:clean_temporary_files
if exist Scrupdate\obj (
rmdir /S /Q Scrupdate\obj
)
exit /b 0
:clean_all
call :clean_temporary_files
if exist Scrupdate\bin (
rmdir /S /Q Scrupdate\bin
)
exit /b 0
:display_failure_message
echo ---------------------------------------------------------------------------------------------------------------
echo Build Was Failed!
echo ---------------------------------------------------------------------------------------------------------------
pause
exit /b 0
:display_success_message
echo ---------------------------------------------------------------------------------------------------------------
echo Build Was Succeeded! [Check output in the 'Scrupdate\bin' directory]
echo ---------------------------------------------------------------------------------------------------------------
pause
exit /b 0