-
Notifications
You must be signed in to change notification settings - Fork 0
/
_Deploy_SR_faction.bat
41 lines (27 loc) · 1.21 KB
/
_Deploy_SR_faction.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
echo off
REM ---------- Edit these variables as needed. --------------------------------
REM Set the character name, which is used for directory names and stuff.
set "charname=Desi-SR_Slow_Burners"
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 Do recursive replacement of '{{ ver }}' with new version number.
REM Needs 'rpl' from <http://gnuwin32.sourceforge.net/packages/rpl.htm>
rpl -R -x".md" -x".json" -q "{{ ver }}" %ver% temp
REM Do the final zipping.
if not exist "distrib\" mkdir "distrib\"
if exist "distrib\%charname%-%ver%.zip" del distrib\%charname%-%ver%.zip
7z a -tzip -r- distrib\%charname%-%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 1 /nobreak
if exist "temp\" rmdir "temp" /s /q
echo.
echo Version v%ver% of %charname% was built.
echo The Thunderstore distributable is at 'distrib/%charname%-%ver%.zip'.
echo.
PAUSE