X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=blobdiff_plain;f=jjb%2Fshell%2Fmake-tar.sh;fp=jjb%2Fshell%2Fmake-tar.sh;h=76d730dca4b7919b8ce3faafaca2db4c5e03d7b3;hp=79e7e6d375afef55eaab9b0163afdc55c59a4368;hb=44fd63c499c0a7d3a9dbb534aab66ca38d46f456;hpb=d4e1f9cc8a01ec0a78eba523bea04c0fe1ac6216 diff --git a/jjb/shell/make-tar.sh b/jjb/shell/make-tar.sh index 79e7e6d..76d730d 100644 --- a/jjb/shell/make-tar.sh +++ b/jjb/shell/make-tar.sh @@ -24,21 +24,29 @@ set -e -u -x -o pipefail rm -fr "$TARDIR" mkdir "$TARDIR" +if [ -n "$STAGING_BUILD" ] +then + # Remove the "-SNAPSHOT" from the version for a staging build + VERSION=$(echo "$VERSION" | sed 's/-SNAPSHOT//') +else + # Make sure the version has the "-SNAPSHOT" on the end for other builds + [[ ! "$VERSION" =~ -SNAPSHOT$ ]] && VERSION="${VERSION}-SNAPSHOT" +fi + if [ "$PROJECT" == "addon-onap" ] then # ONAP addon is special. # Build the regional controller scripts tar ball - # NOTE: Remove the two "-SNAPSHOT" below when the ONAP version.properties is fixed. ARTIFACT_NAME="onap-amsterdam-regional-controller-${STREAM}" - TAR_NAME="${ARTIFACT_NAME}-${VERSION}-SNAPSHOT.tgz" + TAR_NAME="${ARTIFACT_NAME}-${VERSION}.tgz" echo "Making tar file ${TARDIR}/${TAR_NAME}" cd ./src/regional_controller_scripts/ tar -cvzf "${TARDIR}/${TAR_NAME}" -- * # Build the ONAP VM scripts tar ball ARTIFACT_NAME="onap-amsterdam-VM-${STREAM}" - TAR_NAME="${ARTIFACT_NAME}-${VERSION}-SNAPSHOT.tgz" + TAR_NAME="${ARTIFACT_NAME}-${VERSION}.tgz" echo "Making tar file ${TARDIR}/${TAR_NAME}" cd ../onap_vm_scripts/ tar -cvzf "${TARDIR}/${TAR_NAME}" -- *