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
This commit is contained in:
Shawn O. Pearce
2012-05-10 15:31:48 -07:00
parent 450f0cc262
commit 1650acea38
19 changed files with 611 additions and 42 deletions

39
tools/deploy_api.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/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

View File

@@ -1,37 +0,0 @@
#!/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}
JAR=gerrit-plugin-api/target/gerrit-plugin-api-$VER.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 gerrit-plugin-api $VER to $URL"
mvn deploy:deploy-file \
-DgroupId=com.google.gerrit \
-DartifactId=gerrit-plugin-api \
-Dversion=$VER \
-Dpackaging=jar \
-Dfile=$JAR \
-DrepositoryId=gerrit-api-repository \
-Durl=$URL
mvn deploy:deploy-file \
-DgroupId=com.google.gerrit \
-DartifactId=gerrit-plugin-api \
-Dversion=$VER \
-Dpackaging=java-source \
-Dfile=$SRC \
-Djava-source=false \
-DrepositoryId=gerrit-api-repository \
-Durl=$URL