Skip to content

Commit 7db8ec0

Browse files
committed
melting-pot: always build SNAPSHOT components
If their version is a SNAPSHOT, or they depend on SNAPSHOTs, or both.
1 parent cc4cc7d commit 7db8ec0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

melting-pot.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,11 @@ do
678678
a=${apv%%:*}
679679
v=${apv##*:}
680680
bomV=$(grep -o " -D$g\.$a\.version=[^ ]*" "$dir/build.sh" | sed 's;.*=;;')
681-
if [ "$bomV" != "$v" ]
681+
if [ "$bomV" != "${bomV#*-SNAPSHOT*}" ]
682+
then
683+
warn "$1: Snapshot dependency pin detected: $g:$a:$bomV -- forcing a rebuild"
684+
exit 0
685+
elif [ "$bomV" != "$v" ]
682686
then
683687
# G:A property is not set to this V.
684688
# Now check if the property is even declared.
@@ -744,7 +748,7 @@ mkdir -p "$(dirname "$successLog")"
744748
deps=$(grep '^\[[^ ]*INFO[^ ]*\] \w' "$buildLog" |
745749
sed -e 's/^[^ ]* *//' -e 's/ -- .*//' -e 's/ (\([^)]*\))/-\1/' |
746750
sort | tr '\n' ',')
747-
if [ -z "$(containsLine "$deps" "$successLog")" ]
751+
if [ "$deps" = "${deps%*-SNAPSHOT*}" -a -z "$(containsLine "$deps" "$successLog")" ]
748752
then
749753
# NB: *Prepend*, rather than append, the new successful configuration.
750754
# We do this because it is more likely this new configuration will be
@@ -891,7 +895,10 @@ meltDown() {
891895
local gav="$g:$a:$v"
892896
if [ "$(isIncluded "$gav")" ]
893897
then
894-
if [ "$(./prior-success.sh "$g/$a")" ]
898+
if [ "$v" != "${v%-SNAPSHOT}" ]
899+
then
900+
info "$g:$a: forcing inclusion due to SNAPSHOT version"
901+
elif [ "$(./prior-success.sh "$g/$a")" ]
895902
then
896903
info "$g:$a: skipping version $v due to prior successful build"
897904
continue

0 commit comments

Comments
 (0)