Skip to content

Commit cb2d382

Browse files
committed
melting-pot: add a debugging flag
1 parent e6207c2 commit cb2d382

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎melting-pot.sh‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ stderr(){
7777
>&2echo"$@"
7878
}
7979

80+
debug(){
81+
test"$debug"&&
82+
stderr "+ $@"
83+
}
84+
8085
info(){
8186
test"$verbose"&&
8287
stderr "[INFO] $@"
@@ -129,6 +134,9 @@ parseArguments(){
129134
-v|--verbose)
130135
verbose=1
131136
;
137+
-d|--debug)
138+
debug=1
139+
;
132140
-f|--force)
133141
force=1
134142
;
@@ -325,13 +333,15 @@ retrieveSource(){
325333
local scmBranch
326334
test"$2"&& scmBranch="$2"|| scmBranch="$(scmTag "$1")"
327335
local dir="$(groupId "$1")/$(artifactId "$1")"
336+
debug "git clone \"$scmURL\" --branch \"$scmBranch\" --depth 1 \"$dir\""
328337
git clone "$scmURL" --branch "$scmBranch" --depth 1 "$dir"2> /dev/null
329338
echo"$dir"
330339
}
331340

332341
# Gets the list of dependencies for the project in the CWD.
333342
deps(){
334343
cd"$1"
344+
debug "mvn dependency:list"
335345
mvn dependency:list | grep '^\[INFO\] [^ ]'| sed 's/\[INFO\] //'
336346
cd - > /dev/null
337347
}
@@ -499,6 +509,7 @@ meltDown(){
499509
else
500510
info "Building the project!"
501511
# NB: All code is fresh; no need to clean.
512+
debug "mvn $args test"
502513
mvn $argstest
503514
fi
504515

0 commit comments

Comments
(0)