Skip to content

Commit 06f198a

Browse files
committed
[feature] Add a 'clean' target to the build script
1 parent 3bf9db6 commit 06f198a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ do
3737
key="$1"
3838

3939
case $key in
40-
quick|quick-archives|quick-docker|quick-archives-docker|quick-install|test|site|license-check|license-format|dependency-check|dependency-security-check)
40+
clean|quick|quick-archives|quick-docker|quick-archives-docker|quick-install|test|site|license-check|license-format|dependency-check|dependency-security-check)
4141
TARGET="$1"
4242
shift
4343
;;
@@ -70,6 +70,7 @@ function print-useage() {
7070
echo -e "\tlicence-format - Adds the correct license header to any source files that are missing it"
7171
echo -e "\tdependency-check - Checks that all modules have correctly declared their dependencies"
7272
echo -e "\tdependency-security-check - Checks that all dependencies have no unexpected CVE security issues"
73+
echo -e "\tclean - Remove all built artifacts"
7374
echo -e "\n--offline - attempts to run the Maven build in offline mode"
7475
}
7576

@@ -88,6 +89,12 @@ if [ "${OFFLINE}" == "true" ]; then
8889
BASE_CMD="${BASE_CMD} --offline"
8990
fi
9091

92+
if [ "${TARGET}" == "clean" ]; then
93+
CMD="${BASE_CMD} ${CONCURRENCY} clean"
94+
$CMD
95+
exit 0;
96+
fi
97+
9198
if [ "${TARGET}" == "quick" ]; then
9299
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"
93100
$CMD

0 commit comments

Comments
 (0)