blob: 99099ba7641a627fedc4f89e65b18237dd28856c [file] [log] [blame]
Stephan Herrmann7ad0b122018-09-13 20:11:32 +02001# MANDATORY VARIABLE:
2# BUILDID
Stephan Herrmann288c70c2018-06-28 21:25:30 +02003# OPTIONAL VARIABLES TO BE SUPPLIED VIA ENV:
4# SIGN (unset or nosign)
5# PROMOTE (unset or false or target directory)
6
7BASE=`pwd`
8
9# ABSOLUTE PATHS:
10export ECOTJ_BASE=/home/data/httpd/download.eclipse.org/objectteams/ecotj
11
12
13OTDTVERSION=`cat ${BASE}/testrun/build-root/src/finalFeaturesVersions.properties|grep "objectteams.otdt="|cut -d '=' -f 2`
14if [ "${OTDTVERSION}" == "" ]
15then
16 echo "finalFeaturesVersions.properties not found, maybe build hasn't run successfully?"
17 exit 3
18fi
19echo "OTDTVERSION is $OTDTVERSION"
20
Stephan Herrmann7ad0b122018-09-13 20:11:32 +020021ECOTJ_DIR=${BASE}/testrun/ecj/${BUILDID}
Stephan Herrmann288c70c2018-06-28 21:25:30 +020022
23echo "====Step 1: request signing ===="
24cd ${ECOTJ_DIR}
25ECOTJ_JAR=`ls ecotj-*[0-9].jar`
26echo "ecotj is ${ECOTJ_JAR}"
27
28ECOTJ_NAME="ecotj-${BUILDTYPE}-${OTDTVERSION}"
29echo "ecotj name = ${ECOTJ_NAME}"
30
31curl -o ${ECOTJ_NAME}-signed.jar -F file=@${ECOTJ_JAR} http://build.eclipse.org:31338/sign
32
33echo "Signing completed"
34
35
36echo "====Step 2: upload ===="
37
38if [ "${PROMOTE}" != "false" ]
39then
40 cp ${ECOTJ_JAR} ${ECOTJ_BASE}/${ECOTJ_NAME}.jar
41 cp ${ECOTJ_NAME}-signed.jar ${ECOTJ_BASE}/
42 ls -latr ${ECOTJ_BASE}
43fi
44echo "====DONE===="