Skip to content

Commit ac4333c

Browse files
committed
[feature] Add a '--debug' option to the build script
1 parent 06f198a commit ac4333c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

build.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
set -e
2929

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

@@ -41,6 +42,10 @@ case $key in
4142
TARGET="$1"
4243
shift
4344
;;
45+
--debug)
46+
DEBUG=true
47+
shift
48+
;;
4449
--offline)
4550
OFFLINE=true
4651
shift
@@ -57,7 +62,7 @@ esac
5762
done
5863

5964
function print-useage() {
60-
echo -e "\n./build.sh [--offline] <target> | --help"
65+
echo -e "\n./build.sh [--debug] [--offline] <target> | --help"
6166
echo -e "\nAvailable build targets are:"
6267
echo -e "\tquick - A distribution directory that can be found in exist-distribution/target/elemental-x.y.x-dir"
6368
echo -e "\tquick-archives - A distribution directory, and distribution archives that can be found in exist-distribution/target/"
@@ -85,6 +90,10 @@ fi
8590
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
8691
BASE_CMD="${SCRIPT_DIR}/mvnw -V"
8792

93+
if [ "${DEBUG}" == "true" ]; then
94+
BASE_CMD="${BASE_CMD} --debug"
95+
fi
96+
8897
if [ "${OFFLINE}" == "true" ]; then
8998
BASE_CMD="${BASE_CMD} --offline"
9099
fi

0 commit comments

Comments
 (0)