Skip to content

Commit b299caa

Browse files
committed
v1.1.6 update
fixed subtle jar order bug
1 parent fb95fca commit b299caa

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

Utility.bat

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if "%1" EQU "--goto" (
4646
setlocal EnableDelayedExpansion
4747

4848
:: Version control
49-
set "version=1.1.5"
49+
set "version=1.1.6"
5050
if "%1" EQU "--version" (
5151
echo %version%
5252
exit /b
@@ -437,22 +437,17 @@ exit /b
437437
for /D %%i in ("%trackingClasses%\*") do robocopy /E "%%~fi" "%classes%" >nul 2>nul
438438
robocopy /E "%src%" "%classes%" /XF "*.java" >nul 2>nul
439439
copy /Y "%workspace%\LICENSE" "%root%\LICENSE" >nul 2>nul
440-
(
441-
for /F "usebackq tokens=* delims=" %%i in (`PowerShell -Command "Get-ChildItem -Recurse -File -Exclude '*-sources.jar' -Name -Path '%root%'"`) do (
442-
echo -C "%root:\=\\%" %%i
443-
)
444-
for /F "usebackq tokens=* delims=" %%i in (`PowerShell -Command "Get-ChildItem -Recurse -Directory -Name -Path '%root%' | ?{(Get-Item "%root%\$_").GetFileSystemInfos().Count -eq 0}"`) do (
445-
echo -C "%root:\=\\%" %%i
446-
)
447-
)>"%~dp0tmp"
448-
"%JDKBin%\jar.exe" -c -M -f "%addonFile%" "@%~dp0tmp"
440+
robocopy /MIR /MOVE "%lib%" "%workspace%\lib-sources" *-sources.jar >nul 2>nul
441+
"%JDKBin%\jar.exe" -c -M -f "%addonFile%" -C "%root%" .
449442
if %ERRORLEVEL% EQU 0 (
443+
robocopy /E /MOVE "%workspace%\lib-sources" "%lib%" >nul 2>nul
444+
rmdir /Q /S "%workspace%\lib-sources" >nul 2>nul
450445
echo Packing successful.
451-
del /F "%~dp0tmp" >nul 2>nul
452446
exit /b 0
453447
) else (
448+
robocopy /E /MOVE "%workspace%\lib-sources" "%lib%" >nul 2>nul
449+
rmdir /Q /S "%workspace%\lib-sources" >nul 2>nul
454450
echo Packing unsuccessful.
455-
del /F "%~dp0tmp" >nul 2>nul
456451
exit /b 1
457452
)
458453

0 commit comments

Comments
 (0)