Add a "version" parameter to bump.xsl
This commit is contained in:
parent
6631b83ab8
commit
18a2beaa27
1 changed files with 15 additions and 6 deletions
|
@ -7,6 +7,19 @@
|
||||||
|
|
||||||
<xsl:param name="packages" select="'packages.xml'"/>
|
<xsl:param name="packages" select="'packages.xml'"/>
|
||||||
<xsl:param name="package" select="''"/>
|
<xsl:param name="package" select="''"/>
|
||||||
|
<xsl:param name="version" select="'N'"/>
|
||||||
|
|
||||||
|
<xsl:variable name="vers">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$version='N'">
|
||||||
|
<xsl:value-of select=
|
||||||
|
"document($packages)//package[string(name)=$package]/version"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$version"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:output
|
<xsl:output
|
||||||
method="xml"
|
method="xml"
|
||||||
|
@ -20,9 +33,7 @@
|
||||||
<xsl:if test="not(.//package[string(name)=$package])">
|
<xsl:if test="not(.//package[string(name)=$package])">
|
||||||
<package>
|
<package>
|
||||||
<name><xsl:value-of select="$package"/></name>
|
<name><xsl:value-of select="$package"/></name>
|
||||||
<version><xsl:value-of select=
|
<version><xsl:value-of select="$vers"/></version>
|
||||||
"document($packages)//package[string(name)=$package]/version"/>
|
|
||||||
</version>
|
|
||||||
</package>
|
</package>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</sublist>
|
</sublist>
|
||||||
|
@ -33,9 +44,7 @@
|
||||||
<xsl:when test="string(name)=$package">
|
<xsl:when test="string(name)=$package">
|
||||||
<package>
|
<package>
|
||||||
<name><xsl:value-of select="name"/></name>
|
<name><xsl:value-of select="name"/></name>
|
||||||
<version><xsl:value-of select=
|
<version><xsl:value-of select="$vers"/></version>
|
||||||
"document($packages)//package[string(name)=$package]/version"/>
|
|
||||||
</version>
|
|
||||||
</package>
|
</package>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
|
Reference in a new issue