X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Finclude-raw-generate-p2pom.sh;h=85ae3a66025fcd2c459156e9427fb31b1a4c40f4;hb=39ad49f2436d89b0ad6a0645202c5269b30a9c69;hp=5e5ffde6f8c160d925dde4a958b695a5a2d9c8a7;hpb=48b81aafd785486f6ec795a6eb4663c686261e83;p=releng%2Fbuilder.git diff --git a/jjb/include-raw-generate-p2pom.sh b/jjb/include-raw-generate-p2pom.sh index 5e5ffde6f..85ae3a660 100644 --- a/jjb/include-raw-generate-p2pom.sh +++ b/jjb/include-raw-generate-p2pom.sh @@ -9,12 +9,25 @@ # http://www.eclipse.org/legal/epl-v10.html ############################################################################## -FILE_NAME=`echo $P2ZIP_URL | awk -F'/' '{ print $NF }'` -VERSION=`echo $P2ZIP_URL | awk -F'/' '{ print $(NF-1) }'` +if [[ "$P2ZIP_URL" == "" ]]; then + P2ZIP_URL=opendaylight.snapshot/$(find . -name "*.zip" -type f -exec ls "{}" + | head -1) + FILE_NAME=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $NF }') + RELEASE_PATH="snapshot" +else + FILE_NAME=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $NF }') + VERSION=$(echo "$P2ZIP_URL" | awk -F'/' '{ print $(NF-1) }') + RELEASE_PATH="release/$VERSION" + wget --quiet "$P2ZIP_URL" -O "$FILE_NAME" +fi -wget $P2ZIP_URL -O $FILE_NAME +# If we detect a snapshot build then release to a snapshot repo +# YangIDE has indicated that the only want the latest snapshot released to +# the snapshot directory. +if echo "$P2ZIP_URL" | grep opendaylight.snapshot; then + RELEASE_PATH="snapshot" +fi -cat > ${WORKSPACE}/pom.xml < "${WORKSPACE}/pom.xml" < 4.0.0 org.opendaylight.$PROJECT @@ -47,7 +60,7 @@ cat > ${WORKSPACE}/pom.xml <opendaylight-p2 https://nexus.opendaylight.org/service/local/repositories/p2repos/content-compressed $FILE_NAME - org.opendaylight.$PROJECT/$VERSION + org.opendaylight.$PROJECT/$RELEASE_PATH