forked from linuxgurugamer/SXTContinued
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildRelease.bat
58 lines (40 loc) · 1.38 KB
/
buildRelease.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
@echo off
copy SXTContinued.version GameData\SXT
set DEFHOMEDRIVE=d:
set DEFHOMEDIR=%DEFHOMEDRIVE%%HOMEPATH%
set HOMEDIR=
set HOMEDRIVE=%CD:~0,2%
set RELEASEDIR=d:\Users\jbb\release
set ZIP="c:\Program Files\7-zip\7z.exe"
echo Default homedir: %DEFHOMEDIR%
rem set /p HOMEDIR= "Enter Home directory, or <CR> for default: "
if "%HOMEDIR%" == "" (
set HOMEDIR=%DEFHOMEDIR%
)
echo %HOMEDIR%
SET _test=%HOMEDIR:~1,1%
if "%_test%" == ":" (
set HOMEDRIVE=%HOMEDIR:~0,2%
)
set VERSIONFILE=SXTContinued.version
rem The following requires the JQ program, available here: https://stedolan.github.io/jq/download/
c:\local\jq-win64 ".VERSION.MAJOR" %VERSIONFILE% >tmpfile
set /P major=<tmpfile
c:\local\jq-win64 ".VERSION.MINOR" %VERSIONFILE% >tmpfile
set /P minor=<tmpfile
c:\local\jq-win64 ".VERSION.PATCH" %VERSIONFILE% >tmpfile
set /P patch=<tmpfile
c:\local\jq-win64 ".VERSION.BUILD" %VERSIONFILE% >tmpfile
set /P build=<tmpfile
del tmpfile
set VERSION=%major%.%minor%.%patch%
if "%build%" NEQ "0" set VERSION=%VERSION%.%build%
echo Version: %VERSION%
rmdir /s /q %HOMEDIR%\install\Gamedata\SXTContinued
mkdir %HOMEDIR%\install\Gamedata\SXTContinued
copy ..\MiniAVC.dll Gamedata\SXTContinued
copy README.md Gamedata\SXTContinued
set FILE="%RELEASEDIR%\SXTContinued-%VERSION%.zip"
IF EXIST %FILE% del /F %FILE%
%ZIP% a -tzip %FILE% GameData DepreciatedParts
del GameData\SXT\SXTContinued.version