Skip to content

Commit 2afff69

Browse files
committed
ignore *-sources.jar when packaging .addon
1 parent 522f934 commit 2afff69

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Utility.bat

+9-2
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.1"
49+
set "version=1.1.2"
5050
if "%1" EQU "--version" (
5151
echo %version%
5252
exit /b
@@ -420,12 +420,19 @@ exit /b
420420
for /D %%i in ("%trackingClasses%\*") do robocopy /E "%%~fi" "%classes%" >nul 2>nul
421421
robocopy /E "%src%" "%classes%" /XF "*.java" >nul 2>nul
422422
copy /Y "%workspace%\LICENSE" "%root%\LICENSE" >nul 2>nul
423-
"%JDKBin%\jar.exe" -c -M -f "%addonFile%" -C "%root%" .
423+
(
424+
for /F "usebackq tokens=* delims=" %%i in (`PowerShell -Command "Get-ChildItem -Recurse -File -Exclude '*-sources.jar' -Name -Path '%root%'"`) do (
425+
echo -C "%root:\=\\%" %%i
426+
)
427+
)>"%~dp0tmp"
428+
"%JDKBin%\jar.exe" -c -M -f "%addonFile%" "@%~dp0tmp"
424429
if %ERRORLEVEL% EQU 0 (
425430
echo Packing successful.
431+
del /F "%~dp0tmp" >nul 2>nul
426432
exit /b 0
427433
) else (
428434
echo Packing unsuccessful.
435+
del /F "%~dp0tmp" >nul 2>nul
429436
exit /b 1
430437
)
431438

0 commit comments

Comments
 (0)