forked from testng-team/testng
-
Notifications
You must be signed in to change notification settings - Fork 1
/
verify-release
executable file
·45 lines (35 loc) · 1.08 KB
/
verify-release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
if [ $# -eq 0 ]
then
echo "Specify the release number (e.g. 5.14.2)"
exit -1
fi
rel=testng-$1
#
# Make sure that pom.xml and pom-test.xml test the same and latest version
#
v1=`perl -ne 'BEGIN{undef $/}; print "$1" if m/(TestNG.*\n.*version)/mg' pom.xml | awk -F ">" '{ print $2 }' | awk -F "<" '{ print $1 }'`
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}'`
if [ $v1 != $v2 ]
then
echo "Versions of pom.xml and pom-test.xml do not match: $v1 $v2"
# exit -1
fi
#
# Maven
#
./build-with-maven
#cd $HOME/t
#rm -rf surefire
#svn co http://svn.apache.org/repos/asf/maven/surefire/trunk surefire
#cd surefire
#mvn clean install -Dtestng.version=$1
#
# Distribution
#
cd $HOME/t
rm -f *zip
rm -rf $rel
curl http://testng.org/$rel.zip >$rel.zip
unzip $rel.zip
cd $HOME/java/testng
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