Files
gerrit/tools/deploy_api.sh
Shawn O. Pearce 1650acea38 Define gerrit-extension-api module
This module will hold a set of thin interfaces that extensions can
build against. Extensions are more lightweight than plugins and have
a smaller surface of the Gerrit server available to them.

Change-Id: I4213004f1ba5c034cf8fc7fbb9f6dd53f3ec8a96
2012-05-10 16:05:45 -07:00

40 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
SRC=$(ls gerrit-plugin-api/target/gerrit-plugin-api-*-sources.jar)
VER=${SRC#gerrit-plugin-api/target/gerrit-plugin-api-}
VER=${VER%-sources.jar}
type=release
case $VER in
*-SNAPSHOT)
echo >&2 "fatal: Cannot deploy $VER"
echo >&2 " Use ./tools/version.sh --release && mvn clean package"
exit 1
;;
*-[0-9]*-g*) type=snapshot ;;
esac
URL=s3://gerrit-api@commondatastorage.googleapis.com/$type
echo "Deploying API $VER to $URL"
for module in gerrit-extension-api gerrit-plugin-api
do
mvn deploy:deploy-file \
-DgroupId=com.google.gerrit \
-DartifactId=$module \
-Dversion=$VER \
-Dpackaging=jar \
-Dfile=$module/target/$module-$VER.jar \
-DrepositoryId=gerrit-api-repository \
-Durl=$URL
mvn deploy:deploy-file \
-DgroupId=com.google.gerrit \
-DartifactId=$module \
-Dversion=$VER \
-Dpackaging=java-source \
-Dfile=$module/target/$module-$VER-sources.jar \
-Djava-source=false \
-DrepositoryId=gerrit-api-repository \
-Durl=$URL
done