blob: ee4c71313a9af58df6e185ea582e75b6ce5de78b [file] [log] [blame]
# OPTIONAL VARIABLES TO BE SUPPLIED VIA ENV:
# SIGN (unset or nosign)
# PROMOTE (unset or false or target directory)
BASE=`pwd`
# ABSOLUTE PATHS:
export ECOTJ_BASE=/home/data/httpd/download.eclipse.org/objectteams/ecotj
OTDTVERSION=`cat ${BASE}/testrun/build-root/src/finalFeaturesVersions.properties|grep "objectteams.otdt="|cut -d '=' -f 2`
if [ "${OTDTVERSION}" == "" ]
then
echo "finalFeaturesVersions.properties not found, maybe build hasn't run successfully?"
exit 3
fi
echo "OTDTVERSION is $OTDTVERSION"
# FIXME:
ECOTJ_DIR=${BASE}/testrun/ecj/I-2.6.0-201806120848
echo "====Step 1: request signing ===="
cd ${ECOTJ_DIR}
ECOTJ_JAR=`ls ecotj-*[0-9].jar`
echo "ecotj is ${ECOTJ_JAR}"
ECOTJ_NAME="ecotj-${BUILDTYPE}-${OTDTVERSION}"
echo "ecotj name = ${ECOTJ_NAME}"
curl -o ${ECOTJ_NAME}-signed.jar -F file=@${ECOTJ_JAR} http://build.eclipse.org:31338/sign
echo "Signing completed"
echo "====Step 2: upload ===="
if [ "${PROMOTE}" != "false" ]
then
cp ${ECOTJ_JAR} ${ECOTJ_BASE}/${ECOTJ_NAME}.jar
cp ${ECOTJ_NAME}-signed.jar ${ECOTJ_BASE}/
ls -latr ${ECOTJ_BASE}
fi
echo "====DONE===="