summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2006-01-16 23:07:06 +0000
committerPaul W. Frields <stickster@gmail.com>2006-01-16 23:07:06 +0000
commit37c0cf62317836bb0d317bc63f3720f465648c2f (patch)
treecebed132934aeab512ccffd1bba2c9184ebbb989
parente6bd6cf53844616844d5ae06c1d617f6b5e55c21 (diff)
downloadfedora-doc-utils-37c0cf62317836bb0d317bc63f3720f465648c2f.tar.gz
fedora-doc-utils-37c0cf62317836bb0d317bc63f3720f465648c2f.tar.xz
fedora-doc-utils-37c0cf62317836bb0d317bc63f3720f465648c2f.zip
clog target and XSL stylesheet should be able to figure out if this is the first package for a document revision
-rwxr-xr-xbin/insert-changelog1
-rw-r--r--packaging/doc-version.xsl18
2 files changed, 18 insertions, 1 deletions
diff --git a/bin/insert-changelog b/bin/insert-changelog
index 3a7a8db..2676411 100755
--- a/bin/insert-changelog
+++ b/bin/insert-changelog
@@ -22,6 +22,7 @@ echo $ROLE
if test $ROLE = "rpm"; then
REVDATE=`date +"%a %b %d %Y"`
ZEROREV=0
+ NUMBER=1
REVDESC="an integer release number"
elif test $ROLE = "doc"; then
REVDATE=`date +"%Y-%M-%d"`
diff --git a/packaging/doc-version.xsl b/packaging/doc-version.xsl
index f28a6fc..68e1a4a 100644
--- a/packaging/doc-version.xsl
+++ b/packaging/doc-version.xsl
@@ -11,6 +11,22 @@ Optional stringparam "role" allows querying of appropriate revision type.
<xsl:param name="role" select="'doc'"/>
<xsl:template match="/">
- <xsl:value-of select="/rpm-info/changelog/revision[@role=$role][1]/@number"/>
+ <xsl:choose>
+ <xsl:when test="$role='rpm'">
+ <xsl:choose>
+ <xsl:when test="/rpm-info/changelog/revision[1]/@role='doc'">
+ <xsl:text>0</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
+ select="/rpm-info/changelog/revision[@role=$role][1]/@number"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
+ select="/rpm-info/changelog/revision[@role=$role][1]/@number"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
</xsl:stylesheet>