Home | History | Annotate | Download | only in testng
      1 if [ $# -eq 0 ]
      2 then
      3   echo "Specify the release number (e.g. 5.14.2)"
      4   exit -1
      5 fi
      6 
      7 rel=testng-$1
      8 
      9 #
     10 # Make sure that pom.xml and pom-test.xml test the same and latest version
     11 #
     12 
     13 v1=`perl -ne 'BEGIN{undef $/}; print "$1" if m/(TestNG.*\n.*version)/mg' pom.xml | awk -F ">" '{ print $2 }' | awk -F "<" '{ print $1 }'`
     14 
     15 v2=`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 
     17 if [ $v1 != $v2 ]
     18 then
     19   echo "Versions of pom.xml and pom-test.xml do not match: $v1 $v2"
     20 #  exit -1
     21 fi
     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 
     39 cd $HOME/t
     40 rm -f *zip
     41 rm -rf $rel
     42 curl http://testng.org/$rel.zip >$rel.zip
     43 unzip $rel.zip
     44 cd $HOME/java/testng
     45 java -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