bdd0a41aed
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
73 lines
2 KiB
Bash
Executable file
73 lines
2 KiB
Bash
Executable file
#!/usr/bin/bash
|
|
DIR=`pwd`
|
|
|
|
# version
|
|
BASE=1.0.1
|
|
VER=$BASE-incubating
|
|
TAG=$BASE-RC4
|
|
BRANCH=sca-java-$BASE
|
|
|
|
# user/pass for signing
|
|
USER=rfeng
|
|
PASS=
|
|
|
|
if [ -z $PASS ]; then
|
|
stty -echo
|
|
echo "Please enter your GPG passphrase: "
|
|
read PASS
|
|
stty echo
|
|
fi
|
|
|
|
|
|
# Staging maven repo
|
|
REPO_ID=apache.incubator
|
|
REPO_URL=scp://people.apache.org/home/$USER/public_html/tuscany/$TAG/maven
|
|
|
|
# RAT jar
|
|
RAT_JAR=c:\\Apache\\rat\\rat-0.5.1.jar
|
|
|
|
if [ ! -d $TAG ]; then
|
|
echo "SVN copying ..."
|
|
svn copy https://svn.apache.org/repos/asf/incubator/tuscany/branches/$BRANCH $TAG
|
|
fi
|
|
|
|
echo "Changing version ids ..."
|
|
cd $DIR/$TAG
|
|
if grep $VER-SNAPSHOT pom.xml; then
|
|
for i in `/usr/bin/find . -name "*.xml"`; do if grep $VER-SNAPSHOT $i>/dev/null; then sed "s/$VER-SNAPSHOT/$VER/g" $i >/tmp/tmp.xml; cp /tmp/tmp.xml $i; fi; done
|
|
for i in `/usr/bin/find ./itest -name "*.vm"`; do if grep $VER-SNAPSHOT $i>/dev/null; then sed "s/$VER-SNAPSHOT/$VER/g" $i> /tmp/tmp.xml; cp /tmp/tmp.xml $i; fi; done
|
|
fi
|
|
|
|
echo "Generating RAT report ..."
|
|
cd $DIR
|
|
java -jar $RAT_JAR $TAG >$TAG.rat.txt
|
|
|
|
OPTS="-DaltDeploymentRepository=$REPO_ID::default::$REPO_URL verify gpg:sign install:install deploy:deploy -Dgpg.passphrase=$PASS"
|
|
|
|
echo "Deploying modules to stating repo ..."
|
|
cd $DIR/$TAG
|
|
mvn -N $OPTS
|
|
|
|
cd $DIR/$TAG/modules
|
|
mvn $OPTS
|
|
|
|
echo "Building samples ..."
|
|
cd $DIR/$TAG/samples
|
|
mvn clean install
|
|
|
|
echo "Building itests ..."
|
|
cd $DIR/$TAG/itest
|
|
mvn clean install
|
|
|
|
echo "Building distrubtion ..."
|
|
cd $DIR/$TAG/distribution
|
|
mvn clean install
|
|
|
|
echo "Signing distrubtion ..."
|
|
for i in target/*.zip target/*.gz; do gpg --output $i.asc --detach-sig --armor $i; done
|
|
for i in target/*.zip target/*.gz; do openssl md5 -hex $i | sed 's/MD5(\([^)]*\))= \([0-9a-f]*\)/\2 *\1/' > $i.md5; done
|
|
|
|
echo "Deploying tuscany-sca-all ..."
|
|
cd $DIR/$TAG/distribution/bundle/target
|
|
mvn gpg:sign-and-deploy-file -DgroupId=org.apache.tuscany.sca -DartifactId=tuscany-sca-all -Dversion=$VER -Dpackaging=jar -Dfile=tuscany-bundle-$VER.jar -DrepositoryId=$REPO_ID -Durl=$REPO_URL -Dkeyname=$USER -Dpassphrase=$PASS
|
|
|