]> granicus.if.org Git - docbook-dsssl/commitdiff
Made the release-announce script distro-neutral (it had been
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 28 Aug 2007 09:47:21 +0000 (09:47 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 28 Aug 2007 09:47:21 +0000 (09:47 +0000)
hardcoded for docbook-xsl/ns releases), and refined the handling
of message bodies for release announcements.

releasetools/Targets.mk
releasetools/Variables.mk
releasetools/release-announce
releasetools/xslns.mk

index 17761330032e512d267d0d9c3b6971ae3d5fa5df..2075ed1a1f388494f99276e3f75c577cd9206b7b 100644 (file)
@@ -227,8 +227,8 @@ install: tag upload-to-sf-incoming upload-to-project-webspace
        @echo
        @echo "  http://sourceforge.net/project/admin/editpackages.php?group_id=21935"
 
-announce: RELEASE-NOTES-PARTIAL.txt
-       $(RELEASE_ANNOUNCE) $(RELVER) $(ANNOUNCE_RECIPIENTS)
+announce: RELEASE-NOTES-PARTIAL.txt .announcement-text distrib
+       $(RELEASE_ANNOUNCE) "$(DISTRO_TITLE)" "$(RELVER)" "$(ANNOUNCE_RECIPIENTS)" < .announcement-text
 
 tag:
 ifeq (,$(shell svn status))
index e24a7d94418d05512030b8506168660d70dd5d8c..58c6453aaa8655fd2e7efddee45dfb0b905c75ed 100644 (file)
@@ -70,6 +70,7 @@ SVNLOG2DOCBOOK=$(DOCBOOK_SVN)/releasetools/svnlog2docbook.xsl
 SVN_INFO_FILE=.svninfo.xml
 
 PREVIOUS_RELEASE=$(shell $(XSLTPROC) --stringparam get PreviousRelease VERSION VERSION)
+DISTRO_TITLE=$(shell $(XSLTPROC) --stringparam get DistroTitle VERSION VERSION)
 
 REPOSITORY_ROOT=$(shell if [ -f $(SVN_INFO_FILE) ]; then $(XSLTPROC) --stringparam expression //root $(EVALXPATH) $(SVN_INFO_FILE); fi)
 DISTRO_URL=$(shell if [ -f $(SVN_INFO_FILE) ]; then $(XSLTPROC) --stringparam expression //url $(EVALXPATH) $(SVN_INFO_FILE); fi)
index 3d8cbb552fda2dfc2d84f60b208af13a3787ade8..990533aabb448d19789dc65b35f38c530e56cf33 100755 (executable)
@@ -1,70 +1,41 @@
 #!/bin/sh
 # $Id$
 
-# release-announce VERSION RECIPIENTS
-# e.g., release-announce 1.73.0 docbook-apps@lists.oasis-open.org
-
-version=$1
-recipients=$2
-
-rm -f /tmp/HEADER.txt
-rm -f /tmp/HEADER-NS.txt
-rm -f /tmp/BODY-DOCS.txt
-
-cat <<- EOF > /tmp/HEADER.txt
-From: DocBook Project <docbook-dev@xml-doc.org>
+# release-announce - send DocBook Project release announcements
+
+# Usage:
+# release-announce TITLE VERSION RECIPIENTS < messageBodyFile
+#   or
+# cat messageBodyFile | release-announce TITLE VERSION RECIPIENTS 
+#
+# e.g.,
+#   release-announce XSL Stylesheets 1.73.0 docbook-apps@lists.oasis-open.org < .announcement-text
+
+title=$1
+version=$2
+recipients=$3
+sender=docbook-dev@xml-doc.org
+tempfile=/tmp/announcement-message-body.txt
+releasenotesfilename=RELEASE-NOTES-PARTIAL.txt
+
+rm -f $tempfile
+
+cat <<- EOF > $tempfile
+From: DocBook Project <$sender>
 To: $recipients
-Subject: ANNOUNCE: DocBook XSL $version released
-
-The DocBook Project wishes to announce that version $version of the
-DocBook XSL Stylesheets is now available for download from the
-project website:
-
-  http://docbook.sf.net/files/xsl/latest
-  http://sourceforge.net/projects/docbook
-
-The DocBook XSL Stylesheets are designed for processing
-non-namespaced (DocBook 4 or earlier) documents.
+Subject: ANNOUNCE: DocBook $title $version released
 
 EOF
 
-cat <<- EOF > /tmp/HEADER-NS.txt
-From: DocBook Project <docbook-dev@xml-doc.org>
-To: $recipients
-Subject: ANNOUNCE: DocBook XSL-NS $version released
-
-The DocBook Project wishes to announce that version $version of the
-DocBook XSL-NS Stylesheets is now available for download from the
-project website:
-
-  http://docbook.sf.net/files/xsl-ns/latest
-  http://sourceforge.net/projects/docbook
-
-The DocBook XSL-NS Stylesheets are designed for processing
-namespaced (DocBook 5) documents.
+# read in annoucement text
+while read line
+do
+  # substitute actual version no. where needed, append to message body
+  echo $line | sed "s/@@version@@/$version/" >> $tempfile
+done
 
-EOF
-
-cat <<- EOF > /tmp/BODY-DOCS.txt
-The reference docs are packaged separately and downloadable from:
-
-  http://docbook.sf.net/files/xsl-doc/latest
-
-The docs are also available online:
-
-  http://docbook.sf.net/release/xsl/current/doc/reference.html
-  http://docbook.sf.net/release/xsl/current/doc/reference.pdf
-  http://docbook.sf.net/release/xsl/current/doc/reference.txt
-
-The release notes are included below. HTML and PDF versions of the
-release notes are also available:
-
-  http://docbook.sf.net/release/xsl/current/RELEASE-NOTES.html
-  http://docbook.sf.net/release/xsl/current/RELEASE-NOTES.pdf
-
-EOF
+# add a blank line to separate announcement header and text from
+# appended release-notes content
+echo >> $tempfile
 
-cat  /tmp/HEADER.txt /tmp/BODY-DOCS.txt RELEASE-NOTES-PARTIAL.txt \
-  | sendmail -v -f docbook-dev@xml-doc.org $recipients
-cat /tmp/HEADER-NS.txt /tmp/BODY-DOCS.txt RELEASE-NOTES-PARTIAL.txt \
-  | sendmail -v -f docbook-dev@xml-doc.org $recipients
+cat $tempfile $releasenotesfilename | sendmail -v -f $sender $recipients
index 35d01adc36e6731721114b2b3024c0d18449b469..af2376dc2d70c80927b8d87dd023297b3515e032 100644 (file)
@@ -99,3 +99,6 @@ install-ns: upload-to-sf-incoming upload-to-project-webspace-ns
        @echo "Use the following form to move the uploaded files to the project release area."
        @echo
        @echo "  http://sourceforge.net/project/admin/editpackages.php?group_id=21935"
+
+announce-ns: announce
+       $(RELEASE_ANNOUNCE) "XSL-NS Stylesheets" "$(RELVER)" "$(ANNOUNCE_RECIPIENTS)" < $(DOCBOOK_SVN)/releasetools/xslnsfiles/announcement-text