-
Notifications
You must be signed in to change notification settings - Fork 212
Expand file tree
/
Copy pathpublish_jar_nexus.sh
More file actions
executable file
·33 lines (30 loc) · 1.2 KB
/
publish_jar_nexus.sh
File metadata and controls
executable file
·33 lines (30 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#
# SPDX-License-Identifier: Apache-2.0
#
# Exit on first error, print all commands.
set -e
set -o pipefail
WORKSPACE="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
function abort {
echo "!! Exiting shell script"
echo "!!" "$1"
exit -1
}
for binary in shim; do
echo "Pushing fabric-chaincode-$binary.$PUSH_VERSION.jar to maven releases.."
cp $WORKSPACE/fabric-chaincode-$binary/build/libs/fabric-chaincode-$binary-$PUSH_VERSION.jar $WORKSPACE/fabric-chaincode-$binary/build/libs/fabric-chaincode-$binary.$PUSH_VERSION.jar
mvn org.apache.maven.plugins:maven-deploy-plugin:deploy-file \
-DupdateReleaseInfo=true \
-Dfile=$WORKSPACE/fabric-chaincode-$binary/build/libs/fabric-chaincode-$binary.$PUSH_VERSION.jar \
-DpomFile=$WORKSPACE/fabric-chaincode-$binary/build/publications/"$binary"Jar/pom-default.xml \
-DrepositoryId=hyperledger-releases \
-Durl=https://nexus.hyperledger.org/content/repositories/releases/ \
-DgroupId=org.hyperledger.fabric-chaincode-java \
-Dversion=$PUSH_VERSION \
-DartifactId=fabric-chaincode-$binary \
-DgeneratePom=false \
-DuniqueVersion=false \
-Dpackaging=jar \
-gs $GLOBAL_SETTINGS_FILE -s $SETTINGS_FILE
done