-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
buildit.bat
executable file
·36 lines (24 loc) · 941 Bytes
/
buildit.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
@echo off
set RELEASEDIR=d:\Users\jbb\release
set ZIP="c:\Program Files\7-zip\7z.exe"
copy KWRocketryRebalanced.version GameData\KWRocketry
copy KWRocketryRebalanced.version a.version
set VERSIONFILE=a.version
rem set /p VERSION= "Enter 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%
del a.version
set FILE="%RELEASEDIR%\KWRocketryRebalanced-%VERSION%.zip"
IF EXIST %FILE% del /F %FILE%
%ZIP% a -tzip %FILE% GameData Extras