X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Finclude-raw-generate-p2pom.sh;h=8a9731703dab10264537d6e0fe213ed85568d045;hb=35b792724efb17363a39ab7bb091b2f14bd8c50e;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..8a9731703 100644 --- a/jjb/include-raw-generate-p2pom.sh +++ b/jjb/include-raw-generate-p2pom.sh @@ -9,10 +9,23 @@ # 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 < @@ -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