-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSvnCheckout.cmd
60 lines (48 loc) · 1.63 KB
/
SvnCheckout.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
@echo off
setlocal enablecelayedexpansion
set Self=%~n0
set SelfDir=%~dp0
call Config.cmd %Self%
set "DestDir=%USERPROFILE%\Documents\Sources"
echo ==============Connecting to %Connection% network...==============
rasdial %Connection% %UserName% %Pass%
rem wait for 5 sec(get Ip/ receive routes)
ping 127.0.0.1 -n 5 > NUL
echo "============================" > buildResults.log
call :Checkout "%comon_Path%" "%repoDir%/%comon_Name%/trunk"
call :Build "%comon_Path%" %comon_Name%
for %%i in %Repos% do (
call :Checkout "%DestDir%\%%i" "%repoDir%/%%i/trunk"
call :Build "%DestDir%\%%i" %%i
)
echo ==============Disconnecting...==============
rasdial %Connection% /DISCONNECT
type buildResults.log
pause
goto :EOF
:Checkout
set DestPath=%1
set DestPath=%DestPath:"=%
set RepoPath=%2
IF EXIST %DestPath% (
%cd%\bin\svn.exe update %DestPath%
) ELSE (
mkdir %DestPath%
if NOT "%DestPath%"=="%comon_Path%" mklink /d %DestPath%\common %comon_Path%
%cd%\bin\svn.exe checkout %RepoPath% %DestPath%
)
goto :EOF
:Build
set baseDir=%cd%
pushd %1
cd qvx*
for /R "%cd%" %%G in (**.sln) do (
echo ==============Building Release %%G==============
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv" /nologo "%%G" /rebuild Release > buildRelease.log
echo %ERRORLEVEL% %%G Release >> %baseDir%/buildResults.log
echo ==============Building Debug %%G==============
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv" /nologo "%%G" /rebuild Debug > buildDebug.log
echo %ERRORLEVEL% %%G Debug >> %baseDir%/buildResults.log
)
popd
goto :EOF