Skip to content

Commit 7621634

Browse files
committed
Add release script
1 parent b8037ce commit 7621634

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

DevTools/Release.bat

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
:: -----------------------------------------------------------------------------
2+
:: Script used to create zip file containing source code of the Array Utilities
3+
:: unit.
4+
::
5+
:: Requirements:
6+
::
7+
:: 1) This script uses the InfoZip Zip program to create the release zip file.
8+
:: You can download a copy of the required zip program from
9+
:: https://delphidabbler.com/extras/info-zip
10+
::
11+
:: 2) If the ZIPPATH environment variable exists it must provide the path to
12+
:: the directory where zip.exe is located. ZIPPATH *must not* have a
13+
:: trailing backslash. If ZIPPATH does not exist then Zip.exe is expected
14+
:: to be on the system path.
15+
::
16+
:: 3) A release version number may be provided as a parameter to the script.
17+
:: When present the version number is included in the name of the zip file
18+
:: that is created.
19+
::
20+
:: Any copyright in this file is dedicated to the Public Domain.
21+
:: http://creativecommons.org/publicdomain/zero/1.0/
22+
:: -----------------------------------------------------------------------------
23+
24+
@echo off
25+
26+
setlocal
27+
28+
cd ..
29+
30+
set SrcDir=
31+
set DocsDir=Docs
32+
set TestDir=Test
33+
set DemoDir=Demos
34+
set ReleaseDir=_release
35+
36+
set OutFile=%ReleaseDir%\dd-arrayutils
37+
if not "%1" == "" set OutFile=%OutFile%-%1
38+
set OutFile=%OutFile%.zip
39+
echo Output file name = %OutFile%
40+
if exist %OutFile% del %OutFile%
41+
42+
if not "%ZIPPATH%" == "" set ZIPPATH=%ZIPPATH%\
43+
echo Zip path = %ZIPPATH%
44+
45+
if exist %ReleaseDir% rmdir /S /Q %ReleaseDir%
46+
mkdir %ReleaseDir%
47+
48+
%ZIPPATH%Zip.exe -j -9 %OutFile% DelphiDabbler.Lib.ArrayUtils.pas
49+
50+
%ZIPPATH%Zip.exe -j -9 %OutFile% CHANGELOG.md
51+
%ZIPPATH%Zip.exe -j -9 %OutFile% README.md
52+
%ZIPPATH%Zip.exe -j -9 %OutFile% %DocsDir%\MPL-2.txt
53+
%ZIPPATH%Zip.exe -j -9 %OutFile% %DocsDir%\Documentation.URL
54+
55+
%ZIPPATH%Zip.exe %OutFile% -r -9 %TestDir%\*.*
56+
%ZIPPATH%Zip.exe %OutFile% -r -9 %DemoDir%\*.*
57+
58+
endlocal

0 commit comments

Comments
 (0)