forked from CodexLabsLLC/Colosseum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean.cmd
66 lines (54 loc) · 1.71 KB
/
clean.cmd
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@echo off
setlocal
call :setESC
CALL :printHeader, "Removing folders"
call :removeFolder, "external"
call :removeFolder, "AirLib\deps"
call :removeFolder, "AirLib\temp"
call :removeFolder, "AirLib\lib"
ECHO(
CALL :printHeader, "Cleaning visual studio solutions: Configuration = Debug"
msbuild /p:Platform=x64 /p:Configuration=Debug AirSim.sln /t:Clean
if ERRORLEVEL 1 goto :buildfailed
ECHO(
CALL :printHeader, "Cleaning visual studio solutions: Configuration = Release"
msbuild /p:Platform=x64 /p:Configuration=Release AirSim.sln /t:Clean
if ERRORLEVEL 1 goto :buildfailed
ECHO(
CALL :printHeader, "Cleaning visual studio solutions: Configuration = RelWithDebInfo"
msbuild /p:Platform=x64 /p:Configuration=RelWithDebInfo AirSim.sln /t:Clean
if ERRORLEVEL 1 goto :buildfailed
ECHO(
CALL :printHeader, "Cleaning git"
git clean -ffdx
ECHO(
CALL :printHeader, "Pulling latest in git"
git pull
ECHO(
CALL :printHeader, "Clean completed successfully"
goto :eof
:buildfailed
CALL :printHeader, "Clean failed"
goto :eof
:setESC
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set ESC=%%b
exit /B 0
)
exit /B 0
:removeFolder
IF EXIST %~1 (
ECHO Removing folder: %~1
rd /s/q %~1
) ELSE (
ECHO folder "%~1" does not exist!
)
exit /b 0
:printHeader
REM //---------- PrintHeader function ----------
if not "%~1"=="" (
ECHO %ESC%[33m*****************************************************************************************%ESC%[0m
ECHO %ESC%[33m%~1%ESC%%[0
ECHO %ESC%[33m*****************************************************************************************%ESC%%[0m
)
exit /b 0