Thomas Vachuska

Allowing BUCK-built package to take precedence over the Maven-built package if the former is newer.

Change-Id: I5ebec1d0d2997cfaa6e84565f03c1fae838bda7b
...@@ -33,6 +33,12 @@ export ONOS_RPM_VERSION=${ONOS_POM_VERSION//-/.} ...@@ -33,6 +33,12 @@ export ONOS_RPM_VERSION=${ONOS_POM_VERSION//-/.}
33 export ONOS_TAR=$ONOS_STAGE.tar.gz 33 export ONOS_TAR=$ONOS_STAGE.tar.gz
34 export ONOS_ZIP=$ONOS_STAGE.zip 34 export ONOS_ZIP=$ONOS_STAGE.zip
35 35
36 +# If the BUCK-built bits are newer than the Maven-built bits, use the former.
37 +BUCK_TAR=$ONOS_ROOT/buck-out/gen/tools/package/onos-package/onos.tar.gz
38 +if [ -f $BUCK_TAR -a $BUCK_TAR -nt $ONOS_TAR ]; then
39 + rm $ONOS_TAR >/dev/null; ln -s $BUCK_TAR $ONOS_TAR
40 +fi
41 +
36 # ONOS test bits (onos-test.tar.gz) staging environment 42 # ONOS test bits (onos-test.tar.gz) staging environment
37 export ONOS_TEST_BITS=onos-test-${ONOS_VERSION%~*} 43 export ONOS_TEST_BITS=onos-test-${ONOS_VERSION%~*}
38 export ONOS_TEST_STAGE_ROOT=${ONOS_TEST_STAGE_ROOT:-/tmp} 44 export ONOS_TEST_STAGE_ROOT=${ONOS_TEST_STAGE_ROOT:-/tmp}
......