Skip to content

Commit 4862e2b

Browse files
authored
Merge pull request #103 from evolvedbinary/6.x.x/hotfix/simple-build-script
[6.x.x] Improvements to the Simple Build Script
2 parents 7904d46 + d587940 commit 4862e2b

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

build.bat

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,24 @@
2828
setlocal enabledelayedexpansion
2929

3030
set "TARGET=useage"
31+
set "DEBUG=false"
3132
set "OFFLINE=false"
3233
set "CONCURRENCY=-T2C"
3334

3435
:: Process arguments
3536
:parse_args
3637
if "%~1"=="" goto done_parsing
3738

38-
if /I "%~1"=="--offline" (
39+
if /I "%~1"=="--debug" (
40+
set "DEBUG=true"
41+
) else if /I "%~1"=="--offline" (
3942
set "OFFLINE=true"
4043
) else if /I "%~1"=="--help" (
4144
set "TARGET=useage"
4245
) else if /I "%~1"=="-h" (
4346
set "TARGET=useage"
47+
) else if /I "%~1"=="clean" (
48+
set "TARGET=clean"
4449
) else if /I "%~1"=="quick" (
4550
set "TARGET=quick"
4651
) else if /I "%~1"=="quick-archives" (
@@ -69,6 +74,10 @@ goto parse_args
6974

7075
:done_parsing
7176

77+
if "%DEBUG%"=="true" (
78+
set "BASE_CMD=%BASE_CMD% --debug"
79+
)
80+
7281
if "%OFFLINE%"=="true" (
7382
set "BASE_CMD=%BASE_CMD% --offline"
7483
)
@@ -82,10 +91,12 @@ set "SCRIPT_DIR=%~dp0"
8291
set "BASE_CMD=%SCRIPT_DIR%\mvnw.cmd -V"
8392

8493
:: Set CMD based on TARGET
85-
if "%TARGET%"=="quick" (
94+
if "%TARGET%"=="clean" (
95+
set "CMD=%BASE_CMD% %CONCURRENCY% clean -Pinstaller,docker,concurrency-stress-tests,micro-benchmarks"
96+
) else if "%TARGET%"=="quick" (
8697
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"
8798
) else if "%TARGET%"=="quick-archives" (
88-
set "CMD=%BASE_CMD% %CONCURRENCY% clean package -DskipTests -Ddependency-check.skip=true -Ddocker=true -P installer,!concurrency-stress-tests,!micro-benchmarks"
99+
set "CMD=%BASE_CMD% %CONCURRENCY% clean package -DskipTests -Ddependency-check.skip=true -Ddocker=false -P installer,!concurrency-stress-tests,!micro-benchmarks"
89100
) else if "%TARGET%"=="quick-docker" (
90101
set "CMD=%BASE_CMD% %CONCURRENCY% clean package -DskipTests -Ddependency-check.skip=true -Dappbundler.skip=true -Ddocker=true -P docker,!mac-dmg-on-mac,!codesign-mac-app,!codesign-mac-dmg,!mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives"
91102
) else if "%TARGET%"=="quick-archives-docker" (
@@ -115,9 +126,10 @@ goto end
115126

116127
:show_useage
117128
echo.
118-
echo Usage: build.bat [--offline] ^<target^> ^| --help
129+
echo Usage: build.bat [--debug] [--offline] ^<target^> ^| --help
119130
echo.
120131
echo Available build targets:
132+
echo clean - Remove all built artifacts
121133
echo quick - Build distribution directory
122134
echo quick-archives - Build and archive distribution
123135
echo quick-docker - Build distribution + Docker image

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ if [ "${OFFLINE}" == "true" ]; then
9999
fi
100100

101101
if [ "${TARGET}" == "clean" ]; then
102-
CMD="${BASE_CMD} ${CONCURRENCY} clean"
102+
CMD="${BASE_CMD} ${CONCURRENCY} clean -Pinstaller,docker,concurrency-stress-tests,micro-benchmarks"
103103
$CMD
104104
exit 0;
105105
fi
@@ -111,7 +111,7 @@ if [ "${TARGET}" == "quick" ]; then
111111
fi
112112

113113
if [ "${TARGET}" == "quick-archives" ]; then
114-
CMD="${BASE_CMD} ${CONCURRENCY} clean package -DskipTests -Ddependency-check.skip=true -Ddocker=true -P installer,!concurrency-stress-tests,!micro-benchmarks"
114+
CMD="${BASE_CMD} ${CONCURRENCY} clean package -DskipTests -Ddependency-check.skip=true -Ddocker=false -P installer,!concurrency-stress-tests,!micro-benchmarks"
115115
$CMD
116116
exit 0;
117117
fi

0 commit comments

Comments
 (0)