-
Notifications
You must be signed in to change notification settings - Fork 2
/
publishAll.bat
50 lines (41 loc) · 2.17 KB
/
publishAll.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
@echo off & setlocal enabledelayedexpansion
echo ================================================================
echo =================== Automatic Mod Publishing ===================
echo ================================================================
rem needs special handling... set /p github= release to github:
set /p modrinth= release to modrinth:
set /p curseforge= release to curseforge:
echo ================================================================
rem needs special handling... IF %github%==true echo will be released to github
IF %modrinth%==true echo will be released to modrinth
IF %curseforge%==true echo will be released to curseforge
echo ================================================================
echo Are you sure, you want to publish all versions now?
pause
@rem Loop trough everything in the version properties folder
for %%f in (versionProperties\*) do (
@rem Get the name of the version that is going to be compiled
set version=%%~nf
@rem Clean out the folders, build it, and merge it
echo ==================== Cleaning workspace to build !version! ====================
call .\gradlew.bat clean -PmcVer="!version!" --no-daemon
del fabric\build\libs\*.jar
del /F /Q fabric\build
del forge\build\libs\*.jar
del /F /Q forge\build
del neoforge\build\libs\*.jar
del /F /Q neoforge\build
del spigot\build\libs\*.jar
del /F /Q spigot\build
echo ==================== Building !version! ====================
call .\gradlew.bat build -PmcVer="!version!" --no-daemon
echo ==================== Publishing !version! ==================
rem call .\gradlew.bat publishMod -PmcVer="!version!" --no-daemon
rem needs special handling... IF %github%==true call .\gradlew.bat publishGitHub -PmcVer="!version!" --no-daemon
IF %modrinth%==true call .\gradlew.bat publishModrinth -PmcVer="!version!" --no-daemon
IF %curseforge%==true call .\gradlew.bat publishCurseforge -PmcVer="!version!" --no-daemon
)
echo ================================================================
echo =========================== FINISHED ===========================
echo ================================================================
endlocal