Skip to content

Commit c68f2de

Browse files
committed
[feature] Add a 'clean' target to the Windows build script
1 parent 0f496ee commit c68f2de

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.bat

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ if /I "%~1"=="--offline" (
4141
set "TARGET=useage"
4242
) else if /I "%~1"=="-h" (
4343
set "TARGET=useage"
44+
) else if /I "%~1"=="clean" (
45+
set "TARGET=clean"
4446
) else if /I "%~1"=="quick" (
4547
set "TARGET=quick"
4648
) else if /I "%~1"=="quick-archives" (
@@ -82,7 +84,9 @@ set "SCRIPT_DIR=%~dp0"
8284
set "BASE_CMD=%SCRIPT_DIR%\mvnw.cmd -V"
8385

8486
:: Set CMD based on TARGET
85-
if "%TARGET%"=="quick" (
87+
if "%TARGET%"=="clean" (
88+
set "CMD=%BASE_CMD% %CONCURRENCY% clean"
89+
) else if "%TARGET%"=="quick" (
8690
set "CMD=%BASE_CMD% %CONCURRENCY% clean package -DskipTests -Ddependency-check.skip=true -Dappbundler.skip=true -Ddocker=false -P !mac-dmg-on-mac,!codesign-mac-app,!codesign-mac-dmg,!mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives"
8791
) else if "%TARGET%"=="quick-archives" (
8892
set "CMD=%BASE_CMD% %CONCURRENCY% clean package -DskipTests -Ddependency-check.skip=true -Ddocker=false -P installer,!concurrency-stress-tests,!micro-benchmarks"
@@ -118,6 +122,7 @@ echo.
118122
echo Usage: build.bat [--offline] ^<target^> ^| --help
119123
echo.
120124
echo Available build targets:
125+
echo clean - Remove all built artifacts
121126
echo quick - Build distribution directory
122127
echo quick-archives - Build and archive distribution
123128
echo quick-docker - Build distribution + Docker image

0 commit comments

Comments
 (0)