1if [ $# -eq 0 ] 2then 3 echo "Specify the release number (e.g. 5.14.2)" 4 exit -1 5fi 6 7rel=testng-$1 8 9# 10# Make sure that pom.xml and pom-test.xml test the same and latest version 11# 12 13v1=`perl -ne 'BEGIN{undef $/}; print "$1" if m/(TestNG.*\n.*version)/mg' pom.xml | awk -F ">" '{ print $2 }' | awk -F "<" '{ print $1 }'` 14 15v2=`perl -ne 'BEGIN{undef $/}; print "$1" if m/(artifactId.testng.*\n.*version)/mg' pom-test.xml | grep version | awk -F ">" '{print $2}' | awk -F "<" '{print $1}'` 16 17if [ $v1 != $v2 ] 18then 19 echo "Versions of pom.xml and pom-test.xml do not match: $v1 $v2" 20# exit -1 21fi 22 23# 24# Maven 25# 26 27./build-with-maven 28 29#cd $HOME/t 30#rm -rf surefire 31#svn co http://svn.apache.org/repos/asf/maven/surefire/trunk surefire 32#cd surefire 33#mvn clean install -Dtestng.version=$1 34 35# 36# Distribution 37# 38 39cd $HOME/t 40rm -f *zip 41rm -rf $rel 42curl http://testng.org/$rel.zip >$rel.zip 43unzip $rel.zip 44cd $HOME/java/testng 45java -Dtest.resources.dir=$HOME/java/testng/src/test/resources -classpath $HOME/t/$rel/$rel.jar:target/test-classes:lib/guice-2.0.jar org.testng.TestNG $HOME/java/testng/src/test/resources/testng.xml 46