Revert "Modify get bundle script to deal with "...
[releng/builder.git] / jjb / integration / include-raw-integration-get-bundle-vars.sh
index ad4bdeb6b328e05c6d631fcbd3f17536ccc20d7e..9772004f3c37f17592ea215fdc4c9ce273fde43d 100644 (file)
@@ -5,7 +5,7 @@ echo "#################################################"
 NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
 ODL_NEXUS_REPO=${ODL_NEXUS_REPO:-content/repositories/opendaylight.snapshot}
 GERRIT_PATH=${GERRIT_PATH:-git.opendaylight.org/gerrit}
-DISTROBRANCH=${DISTROBRANCH:-GERRIT_BRANCH}
+DISTROBRANCH=${DISTROBRANCH:-$GERRIT_BRANCH}
 
 if [ ${BUNDLEURL} == 'last' ]; then
     # Obtain current pom.xml of integration/distribution, correct branch.
@@ -25,8 +25,8 @@ if [ ${BUNDLEURL} == 'last' ]; then
 else
     ACTUALBUNDLEURL="${BUNDLEURL}"
     BUNDLE="${BUNDLEURL##*/}"
-    BUNDLEFOLDER="${BUNDLE//.zip}"
-    BUNDLEVERSION="${BUNDLEFOLDER//distribution-karaf-}"
+    BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))"
+    BUNDLEFOLDER="distribution-karaf-${BUNDLEVERSION}"
 fi
 
 if [ ${JDKVERSION} == 'openjdk8' ]; then