Skip to content

Commit e65644a

Browse files
committed
melting-pot: rename verbose output 'debug'->'info'
This will make room for an even more verbose '--debug' option.
1 parent 8fb9a2a commit e65644a

3 files changed

Lines changed: 38 additions & 38 deletions

File tree

melting-pot.sh

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

80-
debug() {
80+
info() {
8181
test "$verbose" &&
82-
stderr "[DEBUG] $@"
82+
stderr "[INFO] $@"
8383
}
8484

8585
error() {
@@ -395,7 +395,7 @@ pruneReactor() {
395395
local dir
396396
for dir in */*
397397
do
398-
debug "Checking relevance of component $dir"
398+
info "Checking relevance of component $dir"
399399
local deps="$(deps "$dir")"
400400

401401
# Determine whether the component depends on a changed GAV.
@@ -410,7 +410,7 @@ pruneReactor() {
410410
# If the component is irrelevant, prune it.
411411
if [ -z "$keep" ]
412412
then
413-
debug "Pruning irrelevant component: $dir"
413+
info "Pruning irrelevant component: $dir"
414414
rm -rf "$dir"
415415
fi
416416
done
@@ -449,17 +449,17 @@ generatePOM() {
449449
# specified version for the corresponding GA.
450450
meltDown() {
451451
# Fetch the project source code.
452-
debug "$1: fetching project source"
452+
info "$1: fetching project source"
453453
local dir="$(retrieveSource "$1" "$branch")"
454454

455455
# Get the project dependencies.
456-
debug "$1: determining project dependencies"
456+
info "$1: determining project dependencies"
457457
local deps="$(deps "$dir")"
458458

459459
local args="-Denforcer.skip"
460460

461461
# Process the dependencies.
462-
debug "$1: processing project dependencies"
462+
info "$1: processing project dependencies"
463463
local dep
464464
for dep in $deps
465465
do
@@ -473,13 +473,13 @@ meltDown() {
473473

474474
if [ "$(isIncluded "$gav")" ]
475475
then
476-
debug "$1: $a: fetching component source"
476+
info "$1: $a: fetching component source"
477477
dir="$(retrieveSource "$gav")"
478478
fi
479479
done
480480

481481
# Override versions of changed GAVs.
482-
debug "$1: processing changed components"
482+
info "$1: processing changed components"
483483
local TLS=,
484484
local gav
485485
for gav in $changes
@@ -494,21 +494,21 @@ meltDown() {
494494
test "$prune" && pruneReactor
495495

496496
# Generate the aggregator POM.
497-
debug "Generating aggregator POM"
497+
info "Generating aggregator POM"
498498
generatePOM
499499

500500
# Build everything.
501501
if [ "$skipBuild" ]
502502
then
503-
debug "Skipping the build; the command would have been:"
504-
debug "mvn $args test"
503+
info "Skipping the build; the command would have been:"
504+
info "mvn $args test"
505505
else
506-
debug "Building the project!"
506+
info "Building the project!"
507507
# NB: All code is fresh; no need to clean.
508508
mvn $args test
509509
fi
510510

511-
debug "$1: complete"
511+
info "$1: complete"
512512
}
513513

514514
# -- Main --

tests/melting-pot-prune.t

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
Test that the '--prune' flag works as intended:
22

33
$ sh "$TESTDIR/../melting-pot.sh" net.imagej:imagej-common:0.15.1 -r http://maven.imagej.net/content/groups/public -c org.scijava:scijava-common:2.44.2 -i 'org.scijava:*,net.imagej:*,net.imglib2:*' -p -v -f -s
4-
[DEBUG] net.imagej:imagej-common:0.15.1: fetching project source
5-
[DEBUG] net.imagej:imagej-common:0.15.1: determining project dependencies
6-
[DEBUG] net.imagej:imagej-common:0.15.1: processing project dependencies
7-
[DEBUG] net.imagej:imagej-common:0.15.1: imglib2-roi: fetching component source
8-
[DEBUG] net.imagej:imagej-common:0.15.1: imglib2: fetching component source
9-
[DEBUG] net.imagej:imagej-common:0.15.1: processing changed components
10-
[DEBUG] Checking relevance of component net.imagej/imagej-common
11-
[DEBUG] Checking relevance of component net.imglib2/imglib2
12-
[DEBUG] Pruning irrelevant component: net.imglib2/imglib2
13-
[DEBUG] Checking relevance of component net.imglib2/imglib2-roi
14-
[DEBUG] Pruning irrelevant component: net.imglib2/imglib2-roi
15-
[DEBUG] Generating aggregator POM
16-
[DEBUG] Skipping the build; the command would have been:
17-
[DEBUG] mvn -Denforcer.skip -Dimglib2-roi.version=0.3.0 -Djunit.version=4.11 -Dhamcrest-core.version=1.3 -Dimglib2.version=2.2.1 -Dtrove4j.version=3.0.3 -Dgentyref.version=1.1.0 -Dudunits.version=4.3.18 -Deventbus.version=1.4 -Dscijava-common.version=2.44.2 test
18-
[DEBUG] net.imagej:imagej-common:0.15.1: complete
4+
[INFO] net.imagej:imagej-common:0.15.1: fetching project source
5+
[INFO] net.imagej:imagej-common:0.15.1: determining project dependencies
6+
[INFO] net.imagej:imagej-common:0.15.1: processing project dependencies
7+
[INFO] net.imagej:imagej-common:0.15.1: imglib2-roi: fetching component source
8+
[INFO] net.imagej:imagej-common:0.15.1: imglib2: fetching component source
9+
[INFO] net.imagej:imagej-common:0.15.1: processing changed components
10+
[INFO] Checking relevance of component net.imagej/imagej-common
11+
[INFO] Checking relevance of component net.imglib2/imglib2
12+
[INFO] Pruning irrelevant component: net.imglib2/imglib2
13+
[INFO] Checking relevance of component net.imglib2/imglib2-roi
14+
[INFO] Pruning irrelevant component: net.imglib2/imglib2-roi
15+
[INFO] Generating aggregator POM
16+
[INFO] Skipping the build; the command would have been:
17+
[INFO] mvn -Denforcer.skip -Dimglib2-roi.version=0.3.0 -Djunit.version=4.11 -Dhamcrest-core.version=1.3 -Dimglib2.version=2.2.1 -Dtrove4j.version=3.0.3 -Dgentyref.version=1.1.0 -Dudunits.version=4.3.18 -Deventbus.version=1.4 -Dscijava-common.version=2.44.2 test
18+
[INFO] net.imagej:imagej-common:0.15.1: complete
1919

2020
$ find melting-pot -maxdepth 2
2121
melting-pot

tests/melting-pot-simple.t

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Down-the-middle test of a relatively simply project:
22

33
$ sh "$TESTDIR/../melting-pot.sh" net.imagej:imagej-common:0.15.1 -r http://maven.imagej.net/content/groups/public -c org.scijava:scijava-common:2.44.2 -i 'org.scijava:*,net.imagej:*,net.imglib2:*,io.scif:*' -e net.imglib2:imglib2-roi -v -f -s
4-
[DEBUG] net.imagej:imagej-common:0.15.1: fetching project source
5-
[DEBUG] net.imagej:imagej-common:0.15.1: determining project dependencies
6-
[DEBUG] net.imagej:imagej-common:0.15.1: processing project dependencies
7-
[DEBUG] net.imagej:imagej-common:0.15.1: imglib2: fetching component source
8-
[DEBUG] net.imagej:imagej-common:0.15.1: processing changed components
9-
[DEBUG] Generating aggregator POM
10-
[DEBUG] Skipping the build; the command would have been:
11-
[DEBUG] mvn -Denforcer.skip -Dimglib2-roi.version=0.3.0 -Djunit.version=4.11 -Dhamcrest-core.version=1.3 -Dimglib2.version=2.2.1 -Dtrove4j.version=3.0.3 -Dgentyref.version=1.1.0 -Dudunits.version=4.3.18 -Deventbus.version=1.4 -Dscijava-common.version=2.44.2 test
12-
[DEBUG] net.imagej:imagej-common:0.15.1: complete
4+
[INFO] net.imagej:imagej-common:0.15.1: fetching project source
5+
[INFO] net.imagej:imagej-common:0.15.1: determining project dependencies
6+
[INFO] net.imagej:imagej-common:0.15.1: processing project dependencies
7+
[INFO] net.imagej:imagej-common:0.15.1: imglib2: fetching component source
8+
[INFO] net.imagej:imagej-common:0.15.1: processing changed components
9+
[INFO] Generating aggregator POM
10+
[INFO] Skipping the build; the command would have been:
11+
[INFO] mvn -Denforcer.skip -Dimglib2-roi.version=0.3.0 -Djunit.version=4.11 -Dhamcrest-core.version=1.3 -Dimglib2.version=2.2.1 -Dtrove4j.version=3.0.3 -Dgentyref.version=1.1.0 -Dudunits.version=4.3.18 -Deventbus.version=1.4 -Dscijava-common.version=2.44.2 test
12+
[INFO] net.imagej:imagej-common:0.15.1: complete
1313

1414
$ find melting-pot -maxdepth 2
1515
melting-pot

0 commit comments

Comments
 (0)