Skip to content

Commit 978883e

Browse files
committed
Update Release.bat
* to take a version number as parameter to use in the release file name * to use the correct file in the release, following renaming. * re change from SVN Git * to permit `Zip.exe` to be called with no directory name when on the path.
1 parent 4678e57 commit 978883e

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

DevTools/Release.bat

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,48 @@
66
@rem
77
@rem 1) This script uses the zip.exe program to create the release zip file.
88
@rem
9-
@rem 2) The ZIPPath environment variable must exist and store the path to the
10-
@rem directory where zip.exe is located. ZIPPATH must not have a trailing
11-
@rem backslash.
9+
@rem 2) If the ZIPPATH environment variable exists it must provide the path to
10+
@rem the directory where zip.exe is located. ZIPPATH *must not* have a
11+
@rem trailing backslash. If ZIPPATH does not exist then Zip.exe is expected
12+
@rem to be on the path.
13+
@rem
14+
@rem 3) A release version number may be provided as a parameter to the script.
15+
@rem When present the version number is included in the name of the zip file
16+
@rem that is created.
1217
@rem
1318
@rem Any copyright in this file is dedicated to the Public Domain.
1419
@rem http://creativecommons.org/publicdomain/zero/1.0/
1520
@rem ---------------------------------------------------------------------------
1621

17-
1822
@echo off
1923

2024
setlocal
2125

2226
cd ..
2327

24-
set OutFile=Release\dd-sysinfo.zip
2528
set SrcDir=
2629
set DocsDir=Docs
2730
set DemoDir=Demos
2831

32+
set OutFile=Release\dd-sysinfo
33+
if not "%1" == "" set OutFile=%OutFile%-%1
34+
set OutFile=%OutFile%.zip
35+
echo Output file name = %OutFile%
36+
if exist %OutFile% del %OutFile%
37+
38+
if not "%ZIPPATH%" == "" set ZIPPATH=%ZIPPATH%\
39+
echo Zip path = %ZIPPATH%
40+
2941
if exist Release rmdir /S /Q Release
3042
mkdir Release
3143

32-
echo "OUTFILE=%OutFile%"
33-
if exist %OutFile% del %OutFile%
34-
35-
%ZIPPATH%\Zip.exe -j -9 %OutFile% PJSysInfo.pas
44+
%ZIPPATH%Zip.exe -j -9 %OutFile% PJSysInfo.pas
3645

37-
%ZIPPATH%\Zip.exe -j -9 %OutFile% %DocsDir%\ChangeLog.txt
38-
%ZIPPATH%\Zip.exe -j -9 %OutFile% %DocsDir%\MPL-2.0.txt
39-
%ZIPPATH%\Zip.exe -j -9 %OutFile% %DocsDir%\ReadMe.htm
40-
%ZIPPATH%\Zip.exe -j -9 %OutFile% %DocsDir%\Documentation.URL
46+
%ZIPPATH%Zip.exe -j -9 %OutFile% CHANGELOG.md
47+
%ZIPPATH%Zip.exe -j -9 %OutFile% README.md
48+
%ZIPPATH%Zip.exe -j -9 %OutFile% %DocsDir%\MPL-2.0.txt
49+
%ZIPPATH%Zip.exe -j -9 %OutFile% %DocsDir%\Documentation.URL
4150

42-
%ZIPPATH%\Zip.exe %OutFile% -r -9 %DemoDir%\*.* -x *.svn\*
51+
%ZIPPATH%Zip.exe %OutFile% -r -9 %DemoDir%\*.*
4352

4453
endlocal

0 commit comments

Comments
 (0)