forked from KohrAhr/scm-notifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Upgrade.bat
57 lines (37 loc) · 1.5 KB
/
Upgrade.bat
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
@ECHO off
echo.
echo -----------------------------
echo Please close SVN Notifier !!!
echo -----------------------------
echo.
pause
SET Compiler=%VS90COMNTOOLS%
SET Compiler="%Compiler:\Tools\=\IDE\devenv.com%"
rem -------------------- GET LATEST VERSION ---------------------
svn update
SET errmsg=SVN update failed (errorlevel=%errorlevel%)
IF not %errorlevel% == 0 GOTO ERROR
rem ----------------------- UNINSTALL ----------------------------
if not exist SCM_NotifierSetup\Release\SCM_NotifierSetup.msi goto BUILD
msiexec -q -promptrestart -x SCM_NotifierSetup\Release\SCM_NotifierSetup.msi
rem If product is not installed
IF %errorlevel% == 1605 goto BUILD
SET errmsg=Uninstall failed (errorlevel=%errorlevel%)
IF %errorlevel% == 1638 SET errmsg=Another version of this product is already installed. Remove it manually in "Add/Remove Programs"
IF not %errorlevel% == 0 GOTO ERROR
rem ------------------------ BUILD ------------------------------
:BUILD
SET build=Release
%Compiler% /rebuild %build% SCM_Notifier.sln
SET errmsg=Build failed (errorlevel=%errorlevel%)
IF not %errorlevel% == 0 GOTO ERROR
rem ----------------------- INSTALL ----------------------------
msiexec -i SCM_NotifierSetup\Release\SCM_NotifierSetup.msi
SET errmsg=Install failed (errorlevel=%errorlevel%)
IF not %errorlevel% == 0 GOTO ERROR
rem -------------------------------------------------------------
echo Completed OK
goto :EOF
rem -------------------------------------------------------------
:ERROR
echo Error: %errmsg% !!!