This repository has been archived by the owner on Oct 12, 2020. It is now read-only.
forked from TaxIPP-Life/liam2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_release.bat
102 lines (77 loc) · 2.33 KB
/
make_release.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
@echo off
rem usage is: make_release [version] [branch]
set REPOSITORY=svn://filemail/liam2
if "%1"=="" (
set SVNPATH=trunk
rem this is a hack to retrieve the command output in a variable
for /f "usebackq delims=" %%a in (`python get_rev.py %REPOSITORY%`) do set REV=%%a
set VERSION=r%REV%
) else (
set SVNPATH=tags/%1
set VERSION=%1
)
if "%2"=="" (
set BRANCH=trunk
) else (
set BRANCH=branches/%2
)
set /p ANSWER=Release version "%VERSION%" (y/N)?
if "%ANSWER%"=="" goto :canceled
if /i "%ANSWER:~0,1%" NEQ "y" goto :canceled
pushd %~dp0
if /i "%VERSION:~0,1%"=="r" goto :skiptag
set /p ANSWER=tag release "%VERSION%" (Y/n)?
if /i "%ANSWER:~0,1%" NEQ "y" goto :skiptag
svn cp %REPOSITORY%/%BRANCH% %REPOSITORY%/%SVNPATH%
if %ERRORLEVEL% GEQ 1 goto :failed
:skiptag
rmdir /s /q c:\tmp\liam2_new_release\
cd c:\tmp\
mkdir liam2_new_release
cd liam2_new_release
svn export %REPOSITORY%/%SVNPATH% build
if %ERRORLEVEL% GEQ 1 goto :failed
cd build
7z a -tzip ..\liam2-%VERSION%-src.zip *
call buildall
cd ..
mkdir html\%VERSION%
mkdir win32\documentation\html
mkdir win32\examples
mkdir win32\liam2
mkdir win32\editor
mkdir win64\documentation\html
mkdir win64\examples
mkdir win64\liam2
mkdir win64\editor
xcopy /e build\bundle\editor win32\editor
xcopy /e build\bundle\editor win64\editor
xcopy /e build\tests\examples win32\examples
xcopy /e build\tests\examples win64\examples
copy build\src\build\exe.win32-2.7\* win32\liam2
copy build\src\build\exe.win-amd64-2.7\* win64\liam2
copy build\doc\usersguide\build\LIAM2UserGuide.pdf win32\documentation
copy build\doc\usersguide\build\LIAM2UserGuide.pdf win64\documentation
copy build\doc\usersguide\build\LIAM2UserGuide.pdf LIAM2UserGuide-%VERSION%.pdf
copy build\doc\usersguide\build\LIAM2UserGuide.chm LIAM2UserGuide-%VERSION%.chm
xcopy /e build\doc\usersguide\build\html win32\documentation\html
xcopy /e build\doc\usersguide\build\html win64\documentation\html
xcopy /e build\doc\usersguide\build\html html\%VERSION%
cd win32
7z a -tzip ..\Liam2Suite-%VERSION%.win32.zip *
cd ..
cd win64
7z a -tzip ..\Liam2Suite-%VERSION%.win64.zip *
cd ..
rmdir /s /q win32
rmdir /s /q win64
rmdir /s /q build
popd
goto :end
:canceled
echo Aborted...
goto :end
:failed
popd
exit /b 1
:end