]> granicus.if.org Git - docbook-dsssl/commitdiff
Moved all release metadata to VERSION file, and updated release
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 25 Jan 2007 10:25:23 +0000 (10:25 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 25 Jan 2007 10:25:23 +0000 (10:25 +0000)
build to rely on it.

releasetools/Targets.mk
releasetools/Variables.mk
releasetools/get-param.xsl [new file with mode: 0644]
releasetools/get-previous-revision.xsl [deleted file]
xsl/PreviousRelease [deleted file]
xsl/PreviousRevision [deleted file]
xsl/VERSION

index 1d8a242d11e04d066ad790dfe3481ce96672639f..8d5c403d2470a6abbf86bdca6124d0e45a3c7c6c 100644 (file)
@@ -4,6 +4,8 @@
 # $Id$
 
 debug:
+       echo $(PREVIOUS_RELEASE)
+       echo $(PREVIOUS_REVISION)
 
 .PHONY: ChangeLog.xml ChangeHistory.xml
 
@@ -49,7 +51,7 @@ NEWS.html: NEWS.xml
 $(NEWSFILE): NEWS.html
        LANG=C $(BROWSER) $(BROWSER_OPTS) $< > $@
 
-ChangeLog.xml: PreviousRevision
+ChangeLog.xml:
        $(SVN) $(SVN_OPTS) log --xml --verbose \
        -r HEAD:$(PREVIOUS_REVISION) \
        | $(XMLLINT) $(XMLLINT_OPTS) --format - > $@
@@ -227,7 +229,6 @@ endif
 
 release-clean: clean
        $(MAKE) -C docsrc release-clean
-       $(RM) PreviousRevision
        $(RM) TERMS.xml
        $(RM) $(NEWSFILE)
        $(RM) NEWS.html
index 22ca1d92e790ef888aae402fae0b2f5e1b41274c..c38ac2a013d33da54618274ac4019bb663d630f0 100644 (file)
@@ -60,7 +60,7 @@ MARKUP_XSL=$(DOCBOOK_SVN)/contrib/tools/tennison/modified-markup.xsl
 # to generate NEWS file(s) and releases notes
 SVNLOG2DOCBOOK=$(DOCBOOK_SVN)/releasetools/svnlog2docbook.xsl
 
-PREVIOUS_RELEASE=$(shell if [ -f PreviousRelease ];then cat PreviousRelease; fi)
+PREVIOUS_RELEASE=$(shell $(XSLTPROC) --stringparam param 'PreviousRelease' $(GETPARAM) VERSION)
 
 # stylesheet for stripping DB5 namespace
 STRIP_NS=$(DOCBOOK_SVN)/xsl/common/stripns.xsl
@@ -86,7 +86,7 @@ DBLATEX_FLAGS = -b pdftex
 # file containing "What's New" info generated from Subversion log
 NEWSFILE=NEWS
 
-PREVIOUS_REVISION=$(shell if [ -f PreviousRevision ];then cat PreviousRevision; fi)
+PREVIOUS_REVISION=$(shell $(XSLTPROC) --stringparam param 'PreviousReleaseRevision' $(GETPARAM) VERSION)
 
 # determine RELVER automatically by:
 #
@@ -153,8 +153,6 @@ ZIP_EXCLUDES = \
  Makefile.common \
  Makefile.incl \
  Makefile.param \
- PreviousRelease \
- PreviousRevision \
  ChangeLog\.xml \
  README\.SVN \
  RELEASE-NOTES\.fo \
@@ -191,6 +189,8 @@ GZIPFLAGS=
 XSLTPROC=xsltproc
 XSLTPROC_OPTS=
 
+GETPARAM=$(DOCBOOK_SVN)/releasetools/get-param.xsl
+
 XMLLINT=xmllint
 XMLLINT_OPTS=
 XINCLUDE=$(XMLLINT) $(XMLLINT_OPTS) --xinclude
diff --git a/releasetools/get-param.xsl b/releasetools/get-param.xsl
new file mode 100644 (file)
index 0000000..8984108
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+  <!-- ********************************************************************
+       $Id$
+       ******************************************************************** -->
+  
+  <xsl:output method="text"/>
+  <xsl:param name="param"/>
+  
+  <xsl:template match="/">
+    <xsl:param name="target" select="//*[@*[local-name() = 'name'] = $param]"/>
+    <xsl:choose>
+      <xsl:when test="contains($target, 'Revision')">
+        <xsl:value-of select="substring-before(substring-after($target, 'Revision: '), ' ')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$target"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/releasetools/get-previous-revision.xsl b/releasetools/get-previous-revision.xsl
deleted file mode 100644 (file)
index 6a1635c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
-  <!-- ********************************************************************
-       $Id$
-       ********************************************************************
-
-       This file is part of the XSL DocBook Stylesheet distribution.
-       See ../README or http://docbook.sf.net/release/xsl/current/ for
-       copyright and other information.
-
-       ******************************************************************** -->
-
-  <xsl:output method="text"/>
-
-  <xsl:template match="/">
-    <!-- * The value of the "revision" attribute on the commit element -->
-    <!-- * indicates the last time the file was checked in; since this -->
-    <!-- * is the VERSION file, and that only gets checked in once per -->
-    <!-- * release, that value should indicate the revision number -->
-    <!-- * associated with the latest release. -->
-    <xsl:value-of select="concat(/lists/list/entry/commit/@revision,'&#x0a;')"/>
-  </xsl:template>
-
-</xsl:stylesheet>
diff --git a/xsl/PreviousRelease b/xsl/PreviousRelease
deleted file mode 100644 (file)
index 0834888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1.72.0
diff --git a/xsl/PreviousRevision b/xsl/PreviousRevision
deleted file mode 100644 (file)
index 4c992ee..0000000
+++ /dev/null
@@ -1 +0,0 @@
-6553
index 06e463b74449a38b33085c27e80e4718b2002fa6..d886697a914b65cbf22568c52e310ecf7859b9e6 100644 (file)
@@ -8,13 +8,16 @@
 <xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
 <xsl:param name="DistroTitle" select="string(document('')//fm:Branch[1])"/>
 <xsl:param name="DistroName">docbook-xsl</xsl:param>
+<xsl:param name="PreviousRelease">1.72.0</xsl:param>
+<xsl:param name="PreviousReleaseRevision">6553</xsl:param>
+<xsl:param name="Revision">$Revision$</xsl:param>
 <xsl:param name="sf-relid" select="0"/>
 <xsl:strip-space elements="fm:*"/>
 
 <fm:project>
   <fm:Project>DocBook</fm:Project>
   <fm:Branch>XSL Stylesheets</fm:Branch>
-  <fm:Version>1.72.1+pre</fm:Version>
+  <fm:Version>1.72.1-pre</fm:Version>
 <!--
   <fm:License>MIT/X Consortium License</fm:License>
 -->