Author: schultz
Date: Tue Dec 12 16:11:49 2023
New Revision: 1914605

URL: http://svn.apache.org/viewvc?rev=1914605&view=rev
Log:
Initial work on auto-generation of release announcement email.

Added:
    tomcat/site/trunk/tools/email-template-10.1.txt
    tomcat/site/trunk/tools/email-template-8.5.txt
Modified:
    tomcat/site/trunk/tools/update-version.sh

Added: tomcat/site/trunk/tools/email-template-10.1.txt
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/tools/email-template-10.1.txt?rev=1914605&view=auto
==============================================================================
--- tomcat/site/trunk/tools/email-template-10.1.txt (added)
+++ tomcat/site/trunk/tools/email-template-10.1.txt Tue Dec 12 16:11:49 2023
@@ -0,0 +1,36 @@
+===
+TODO: Set these addresses as appropriate:
+
+From: ${RELEASE_MANAGER}@apache.org
+Reply-To: Tomcat Developers List <dev@tomcat.apache.org>
+===
+
+The Apache Tomcat team announces the immediate availability of Apache
+Tomcat ${NEW_RELEASE}.
+
+Apache Tomcat 10 is an open source software implementation of the
+Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language,
+Jakarta WebSocket, Jakarta Authentication and Jakarta Annotations
+specifications.
+
+Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 
without changes. Java EE applications designed for Tomcat 9 and earlier may be 
placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will 
automatically convert them to Jakarta EE and copy them to the webapps 
directory. This conversion is performed using the Apache Tomcat migration tool 
for Jakarta EE tool which is also available as a separate download for off-line 
use.
+
+Apache Tomcat ${NEW_RELEASE} is a bugfix and feature release. The notable 
changes compared to ${OLD_RELEASE} include:
+
+===
+TODO Enter several changelog entries
+===
+
+Please refer to the change log for the complete list of changes:
+http://tomcat.apache.org/tomcat-10.1-doc/changelog.html
+
+Downloads:
+http://tomcat.apache.org/download-10.cgi
+
+Migration guides from Apache Tomcat 8.5.x and 9.0.x:
+http://tomcat.apache.org/migration.html
+
+Enjoy!
+
+- The Apache Tomcat team
+

Added: tomcat/site/trunk/tools/email-template-8.5.txt
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/tools/email-template-8.5.txt?rev=1914605&view=auto
==============================================================================
--- tomcat/site/trunk/tools/email-template-8.5.txt (added)
+++ tomcat/site/trunk/tools/email-template-8.5.txt Tue Dec 12 16:11:49 2023
@@ -0,0 +1,34 @@
+===
+TODO: Set these addresses as appropriate:
+
+From: ${RELEASE_MANAGER}@apache.org
+Reply-To: Tomcat Developers List <dev@tomcat.apache.org>
+===
+
+The Apache Tomcat team announces the immediate availability of Apache
+Tomcat ${NEW_RELEASE}.
+
+Apache Tomcat 8 is an open source software implementation of the Java
+Servlet, JavaServer Pages, Java Unified Expression Language, Java
+WebSocket and JASPIC technologies.
+
+Apache Tomcat ${NEW_RELEASE} is a bugfix and feature release. The notable
+changes compared to ${OLD_RELEASE} include:
+
+$CHANGELOG
+
+Please refer to the change log for the complete list of changes:
+https://tomcat.apache.org/tomcat-8.5-doc/changelog.html
+
+Downloads:
+https://tomcat.apache.org/download-80.cgi
+
+Migration guides from Apache Tomcat 7.x and 8.0:
+https://tomcat.apache.org/migration.html
+
+Please note that Tomcat 8.5.x will reach End-of-life (EOL) on 31 March 2024. 
For more information please visit https://tomcat.apache.org/tomcat-85-eol.html
+
+Enjoy!
+
+- The Apache Tomcat team
+

Modified: tomcat/site/trunk/tools/update-version.sh
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/tools/update-version.sh?rev=1914605&r1=1914604&r2=1914605&view=diff
==============================================================================
--- tomcat/site/trunk/tools/update-version.sh (original)
+++ tomcat/site/trunk/tools/update-version.sh Tue Dec 12 16:11:49 2023
@@ -69,6 +69,44 @@ fi
 
 osinfo="$( uname -a )"
 
+if [ "email" = "$5" ] ; then
+  export NEW_RELEASE
+  export OLD_RELEASE
+  export RELEASE_MANAGER
+
+  if [ "" = "$( command -v xpath )" ] ; then
+    export CHANGELOG="===\nTODO Enter several changelog entries\n===\n"
+  else
+    export CHANGELOG=$( xpath  -q -e "/document/body/section[@name = 'Tomcat 
${NEW_RELEASE} Released']/ul/li" xdocs/index.xml | sed -e 's/<li>/ - /' -e 
's/<\/li>//' )
+  fi
+
+  if [ "0" '!=' "$( expr "$osinfo" : '.*Darwin' )" ] ; then
+    # We are on MacOS and have a bunch of useful utilities available.
+
+    if [ "" = "$( command -v envsubst )" ] ; then
+      open "mailto:Tomcat Developers List <dev@tomcat.apache.org>,Tomcat Users 
List <us...@tomcat.apache.org>, annou...@tomcat.apache.org, 
annou...@apache.org?subject=Apache%20Tomcat%20${NEW_RELEASE}%20Available&body=$(
 cat tools/email-template-${MINOR_RELEASE}.txt | sed -e 
"s/\${NEW_RELEASE}/${NEW_RELEASE}/g" -e "s/\${OLD_RELEASE}/${OLD_RELEASE}/g" -e 
"s/\${RELEASE_MANAGER}/${RELEASE_MANAGER}/g" 
)&from=${RELEASE_MANAGER}@apache.org"
+    else
+      open "mailto:Tomcat Developers List <dev@tomcat.apache.org>,Tomcat Users 
List <us...@tomcat.apache.org>, annou...@tomcat.apache.org, 
annou...@apache.org?subject=Apache%20Tomcat%20${NEW_RELEASE}%20Available&body=$(
 cat tools/email-template-${MINOR_RELEASE}.txt | envsubst 
)&from=${RELEASE_MANAGER}@apache.org"
+    fi
+  else
+    echo Email template:
+    echo
+    echo "From: ${RELEASE_MANAGER}@apache.org"
+    echo "To: Tomcat Developers List <dev@tomcat.apache.org>,Tomcat Users List 
<us...@tomcat.apache.org>, annou...@tomcat.apache.org, annou...@apache.org"
+    echo "Reply-To: Tomcat Developers List <dev@tomcat.apache.org>"
+    echo
+    if [ "" '!=' "$( command -v envsubst )" ] ; then
+      cat tools/email-template-${MINOR_RELEASE}.txt | envsubst
+    else
+      cat tools/email-template-${MINOR_RELEASE}.txt | sed -e 
"s/\${NEW_RELEASE}/${NEW_RELEASE}/g" -e "s/\${OLD_RELEASE}/${OLD_RELEASE}/g" -e 
"s/\${RELEASE_MANAGER}/${RELEASE_MANAGER}/g"
+#  -e "s/\${CHANGELOG}/${CHANGELOG}/g"
+    fi
+    echo
+  fi
+
+  exit
+fi
+
 # Check to see if the release artifacts are available from the download site...
 found=$( curl -Isiw '%{http_code}' -o /dev/null 
https://downloads.apache.org/tomcat/tomcat-${MAJOR_RELEASE}/v${NEW_RELEASE}/ )
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to