-
Notifications
You must be signed in to change notification settings - Fork 0
/
_Deploy_toolpaks.bat
40 lines (28 loc) · 1.21 KB
/
_Deploy_toolpaks.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
echo off
REM ---------- Edit these variables as needed. --------------------------------
REM Set the collection name, which is used for the archive name.
set "setname=ClearRecent"
REM ---------- No user-editable variables below. ------------------------------
REM Ask for new version number, which is used to find-replace in files.
set /p ver="Enter a new version number: "
REM Copy target files to temporary folder.
if exist "temp\" rmdir "temp" /s /q
if not exist "temp\" mkdir "temp\"
robocopy src\ temp\ /s
REM Copy the readme up and rename it to .txt (because I've seen people
REM in the retro gaming community get confused expecting .md to be a MegaDrive ROM).
robocopy .\ temp\ README.md
rename temp\README.md "%setname%-README.txt"
REM Do the final zipping.
if not exist "distrib\" mkdir "distrib\"
if exist "distrib\%setname%-%ver%.zip" del distrib\%setname%-%ver%.zip
7z a -tzip -r- distrib\%setname%-%ver%.zip .\temp\*
REM Delete the temporary folder and announce success
REM Wait for a second to wait for the processes to finish.
timeout /t 2 /nobreak
if exist "temp\" rmdir "temp" /s /q
echo.
echo Version v%ver% of %setname% was built.
echo The distributable is at 'distrib/%etname%-%ver%.zip'.
echo.
PAUSE