You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2021/04/12 02:14:03 UTC

[tomee-tck] branch jakartaee9-tck updated: Add the ability to download and setup GlassFish

This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a commit to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git


The following commit(s) were added to refs/heads/jakartaee9-tck by this push:
     new f71642e  Add the ability to download and setup GlassFish
f71642e is described below

commit f71642e94e9a54d356c944b080e31003db7f204b
Author: David Blevins <da...@gmail.com>
AuthorDate: Sun Apr 11 19:13:35 2021 -0700

    Add the ability to download and setup GlassFish
---
 update91tck.sh | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/update91tck.sh b/update91tck.sh
index d26fc0b..ac34828 100755
--- a/update91tck.sh
+++ b/update91tck.sh
@@ -14,6 +14,13 @@ grep -q -m 1 jakartaee91.cts.home ~/.m2/settings.xml || {
     exit 1
 }
 
+grep -q -m 1 jakartaee91.ri.home ~/.m2/settings.xml || {
+    echo "No <jakartaee91.ti.home> variable found in ~/.m2/settings.xml"
+    echo "This script requires you to have setup the EE 9.1 TCK at least once manually"
+    echo "See the README.adoc for further instructions"
+    exit 1
+}
+
 ## Download the jakarta-jakartaeetckinfo.txt from Eclipse and get basic meta data
 TCKINFO="$(curl -s https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee9-eftl/staged-910/jakarta-jakartaeetckinfo.txt)"
 DATESTAMP="$(echo "$TCKINFO" | grep 'date:' | perl -pe 's,.*date: (\d\d\d\d-\d\d-\d\d) (\d\d):(\d\d).*,$1.$2$3,')"
@@ -25,8 +32,15 @@ NAME="$(echo "$TCKINFO" | grep 'Name:' | perl -pe 's,.*Name: *jakarta-([^ ]+)\.z
 OLDTCK="$(grep jakartaee91.cts.home ~/.m2/settings.xml | perl -pe 's,.*home>([^<]+)<.*,$1,')"
 TCKDIR="$(dirname "$OLDTCK")"
 
+## Look at our existing tck setup to see where GlassFish should be installed
+OLDRI="$(grep jakartaee91.ri.home ~/.m2/settings.xml | perl -pe 's,.*home>([^<]+)<.*,$1,')"
+RIDIR="$(dirname "$OLDRI")"
+
 TCK="$NAME-$DATESTAMP"
 
+RI="glassfish-6.0.0"
+RIURL="https://download.eclipse.org/ee4j/glassfish/$RI.zip"
+
 echo "Latest TCK
 NAME: $NAME
 DATE: $DATESTAMP
@@ -34,7 +48,7 @@ URL:  $URL
 SHA:  $SHA
 DIR:  $TCKDIR
 "
-
+#https://download.eclipse.org/ee4j/glassfish/glassfish-6.0.0.zip
 ## Download the TCK if we have not
 [ -f "$TCKDIR/$TCK.zip" ] || (
     echo "Downloading $TCK.zip"
@@ -54,6 +68,25 @@ echo "Downloaded $TCK.zip"
 
 echo "Extracted $TCK"
 
+## Download the RI if we have not                                                                                                                      
+[ -f "$RIDIR/$RI.zip" ] || (
+    echo "Downloading $RI.zip"
+    cd "$RIDIR" &&
+    curl "$RIURL" > "$RI.zip"
+)
+
+echo "Downloaded $RI.zip"
+
+## Extract the RI if we have not                                                                                                                       
+[ -d "$RIDIR/$RI" ] || (
+    echo "Extracting to $RIDIR/$RI"
+    mkdir "$RIDIR/$RI" &&
+        cd "$RIDIR/$RI" &&
+        bsdtar --strip-components=1 -xf "../$RI.zip"
+)
+
+echo "Extracted $RI"
+
 ## Download ant if we have not
 [ -f "$TCKDIR/apache-ant-1.10.9-bin.zip" ] || (
     echo "Downloading ant"
@@ -76,6 +109,9 @@ echo "Extracted ant"
 ## Update jakartaee91.cts.home in ~/.m2/settings.xml
 perl -i -pe "s,(<jakartaee91.cts.home>)[^<]+<,\$1$TCKDIR/$TCK<," ~/.m2/settings.xml
 
+## Update jakartaee91.ri.home in ~/.m2/settings.xml
+perl -i -pe "s,(<jakartaee91.ri.home>)[^<]+<,\$1$RIDIR/$RI<," ~/.m2/settings.xml
+
 echo "Updated ~/.m2/settings.xml"
 
 ## Add info.txt and sha256 files into the extracted TCK