-
Notifications
You must be signed in to change notification settings - Fork 1
/
grass_packager_release.bat
88 lines (69 loc) · 1.77 KB
/
grass_packager_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
@echo off
REM
REM TODO: merge with grass_packager.bat
REM
set HOME=C:\Users\landamar\grass_packager
cd %HOME%
set MAJOR=8
set MINOR=4
set PATCH=0
set REV=1
set GVERSION=%MAJOR%%MINOR%%PATCH%
REM
echo Clean-up...
REM
call :cleanUp
REM
echo Cloning release...
REM
C:\msys64\usr\bin\bash.exe .\msys_clone_release.sh %MAJOR%.%MINOR%.%PATCH%
REM
echo Compiling GRASS GIS...
REM
C:\msys64\usr\bin\bash.exe .\grass_compile.sh %GVERSION%
REM
echo Clean-up for packaging...
REM
call:cleanUpPkg
REM
echo Preparing packages...
REM
call:preparePkg
REM
echo Finding latest package and update info...
REM
C:\msys64\usr\bin\bash.exe .\grass_osgeo4w.sh %GVERSION% %MAJOR%.%MINOR%.%PATCH% %REV%
C:\msys64\usr\bin\bash.exe .\grass_rev_info.sh %GVERSION% %REV%
REM
echo Creating standalone installer...
REM
call:createPkg
REM
echo Create md5sum files
REM
C:\msys64\usr\bin\bash.exe .\grass_md5sum.sh %GVERSION%
REM
echo Building addons...
REM
C:\msys64\usr\bin\bash.exe .\grass_addons.sh %GVERSION%
REM
echo Publishing packages...
REM
C:\msys64\usr\bin\bash.exe .\grass_copy_scp.sh %GVERSION%
exit /b %ERRORLEVEL%
:cleanUp
if exist "C:\OSGeo4W\apps\grass\grass-%MAJOR%.%MINOR%.%PATCH%" rmdir /S/Q "C:\OSGeo4W%~1\apps\grass\grass-%MAJOR%.%MINOR%.%PATCH%"
exit /b 0
:cleanUpPkg
if exist .\grass%GVERSION% rmdir /S/Q .\grass%GVERSION%
xcopy C:\msys64\usr\src\grass%GVERSION%\mswindows\* .\grass%GVERSION% /S/V/I > NUL
exit /b 0
:preparePkg
cd .\grass%GVERSION%
call .\GRASS-Packager.bat > .\GRASS-Packager.log
C:\msys64\usr\bin\bash.exe ..\grass_binary_revision.sh %REV%
cd ..
exit /b 0
:createPkg
C:\DevTools\makensis.exe .\grass%GVERSION%\GRASS-Installer.nsi > .\grass%GVERSION%\GRASS-Installer.log
exit /b 0