blob: 03896d0205e2250caec89664d50d27e076119c2a [file] [log] [blame]
Stephan Herrmannaec6bf02016-12-31 17:25:42 +01001#!/bin/sh
2#*******************************************************************************
3# Copyright (c) 2016 GK Software AG and others.
4# All rights reserved. This program and the accompanying materials
5# are made available under the terms of the Eclipse Public License v1.0
6# which accompanies this distribution, and is available at
7# http://www.eclipse.org/legal/epl-v10.html
8#
9# Contributors:
10# Stephan Herrmann - initial API and implementation
11#********************************************************************************
12
13REPO_BASE=${WORKSPACE}/../../CBIaggregator/workspace
14REPO=${REPO_BASE}/repo-${REPO_ID}
15PLATFORM=org/eclipse/platform
16
17if [ ! -d ${REPO} ]
18then
19 echo "No repo at ${REPO}"
20 exit 1
21fi
22
23echo "==== Copy artifacts from ${REPO}/${PLATFORM} ===="
24
25mkdir -p ${PLATFORM}
26cp -r ${REPO}/${PLATFORM}/* ${PLATFORM}/
27
28
29echo "==== UPLOAD ===="
30
31URL=https://oss.sonatype.org/service/local/staging/deploy/maven2/
32REPO=ossrh
33SETTINGS=/opt/public/hipp/homes/genie.releng/.m2/settings-deploy-ossrh-platform.xml
34MVN=/shared/common/apache-maven-latest/bin/mvn
35
36/bin/mkdir .log
37
38for pomFile in org/eclipse/platform/*/*/*.pom
39do
40 file=`echo $pomFile | sed -e "s|\(.*\)\.pom|\1.jar|"`
41 sourcesFile=`echo $pomFile | sed -e "s|\(.*\)\.pom|\1-sources.jar|"`
42 javadocFile=`echo $pomFile | sed -e "s|\(.*\)\.pom|\1-javadoc.jar|"`
43
44 echo "${MVN} -f platform-pom.xml -s ${SETTINGS} gpg:sign-and-deploy-file -Durl=${URL} -DrepositoryId=${REPO} -Dfile=${file} -DpomFile=${pomFile}"
45
46 ${MVN} -f platform-pom.xml -s ${SETTINGS} gpg:sign-and-deploy-file \
47 -Durl=${URL} -DrepositoryId=${REPO} \
48 -Dfile=${file} -DpomFile=${pomFile} \
49 >> .log/artifact-upload.txt
50
Stephan Herrmann9fc05c92016-12-31 17:35:26 +010051 echo -e "\t${sourcesFile}"
Stephan Herrmannaec6bf02016-12-31 17:25:42 +010052 ${MVN} -f platform-pom.xml -s ${SETTINGS} gpg:sign-and-deploy-file \
53 -Durl=${URL} -DrepositoryId=${REPO} \
54 -Dfile=${sourcesFile} -DpomFile=${pomFile} -Dclassifier=sources \
55 >> .log/sources-upload.txt
56
Stephan Herrmann9fc05c92016-12-31 17:35:26 +010057 echo -e "\t${javadocFile}"
Stephan Herrmannaec6bf02016-12-31 17:25:42 +010058 ${MVN} -f platform-pom.xml -s ${SETTINGS} gpg:sign-and-deploy-file \
59 -Durl=${URL} -DrepositoryId=${REPO} \
60 -Dfile=${javadocFile} -DpomFile=${pomFile} -Dclassifier=javadoc \
61 >> .log/javadoc-upload.txt
62
63done
64
65/bin/ls -la .log
66
67/bin/grep -i fail .log/*
68