Patch https://git.opendaylight.org/gerrit/41839/ introduced a new parent
causing the autorelease job to retrieve the wrong version string.
Change-Id: Ic7602b96c53c081c1b4b1d9edb6d747e5376880a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
##############################################################################
NEXUSURL=https://nexus.opendaylight.org/content/repositories/
-VERSION=`grep -m1 '<version>' ${WORKSPACE}/integration/distribution/distribution-karaf/pom.xml | awk -F'[<|>]' '/version/ { printf $3 }'`
+VERSION=`grep -m2 '<version>' ${WORKSPACE}/integration/distribution/distribution-karaf/pom.xml | tail -n1 | awk -F'[<|>]' '/version/ { printf $3 }'`
if [ "x${VERSION}" == "x" ]; then
echo "Lithium or sooner, different path needs to be searched."
VERSION=`grep -m1 '<version>' ${WORKSPACE}/integration/distribution/distributions/karaf/pom.xml | awk -F'[<|>]' '/version/ { printf $3 }'`