-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpublish.bat
56 lines (46 loc) · 1.38 KB
/
publish.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
::ATOMIC SCIENCE BUILDER
@echo off
echo Promotion Type?
set /p PROMOTION=
set /p MODVERSION=<modversion.txt
set /p CurrentBuild=<buildnumber.txt
set /a BUILD_NUMBER=%CurrentBuild%+1
echo %BUILD_NUMBER% >buildnumber.txt
if %PROMOTION%==* (
echo %MODVERSION% >recommendedversion.txt
)
set FILE_NAME=MFFS_v%MODVERSION%.%BUILD_NUMBER%.jar
set API_NAME=MFFS_v%MODVERSION%.%BUILD_NUMBER%_api.zip
set BACKUP_NAME=MFFS_v%MODVERSION%.%BUILD_NUMBER%_backup.zip
echo Starting to build %FILE_NAME%
::BUILD
runtime\bin\python\python_mcp runtime\recompile.py %*
runtime\bin\python\python_mcp runtime\reobfuscate.py %*
::ZIP-UP
cd reobf\minecraft\
7z a "..\..\builds\%FILE_NAME%" "*"
cd ..\..\
cd resources\
7z a "..\builds\%FILE_NAME%" "*"
7z a "..\builds\%BACKUP_NAME%" "*" -phenry
cd ..\
cd src\
7z a "..\builds\%BACKUP_NAME%" "*\mffs\" -phenry
7z a "..\builds\%API_NAME%" "*\mffs\api\"
cd ..\
::UPDATE INFO FILE
echo %PROMOTION% %FILE_NAME% %API_NAME%>>info.txt
::GENERATE FTP Script
echo open calclavia.com>ftpscript.txt
echo [email protected]>>ftpscript.txt
echo Es43mJf3UhFM>>ftpscript.txt
echo binary>>ftpscript.txt
echo put "recommendedversion.txt">>ftpscript.txt
echo put "builds\%FILE_NAME%">>ftpscript.txt
echo put "builds\%API_NAME%">>ftpscript.txt
echo put info.txt>>ftpscript.txt
echo quit>>ftpscript.txt
ftp.exe -s:ftpscript.txt
del ftpscript.txt
echo Done building %FILE_NAME% for UE %UE_VERSION%
pause