summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2005-03-01 15:35:32 +0000
committermichelou <michelou@epfl.ch>2005-03-01 15:35:32 +0000
commitd389d624970bda2822d22182dbf0f7269f4c6a61 (patch)
treee8ac7a7a3bd92deb39e1ccc368ec4c65f6711349 /config
parent3a11fb5be6170dff56dc58e1d671509e72c0265e (diff)
downloadscala-d389d624970bda2822d22182dbf0f7269f4c6a61.tar.gz
scala-d389d624970bda2822d22182dbf0f7269f4c6a61.tar.bz2
scala-d389d624970bda2822d22182dbf0f7269f4c6a61.zip
- corrected generation of major, minor, revisio...
- corrected generation of major, minor, revision and subversion numberings which may have 2-digits!
Diffstat (limited to 'config')
-rw-r--r--config/ia/setversion.xsl40
1 files changed, 28 insertions, 12 deletions
diff --git a/config/ia/setversion.xsl b/config/ia/setversion.xsl
index 407a8c9d0c..b81a21fdc0 100644
--- a/config/ia/setversion.xsl
+++ b/config/ia/setversion.xsl
@@ -39,24 +39,40 @@
<xsl:template match="property">
<xsl:choose>
<xsl:when test="@name='productVersionMajor'">
- <property name="productVersionMajor">
- <int><xsl:value-of select="substring($version,1,1)"/></int>
- </property>
+ <xsl:variable
+ name="major"
+ select="substring-before($version,'.')">
+ </xsl:variable>
+ <property name="productVersionMajor">
+ <int><xsl:value-of select="$major"/></int>
+ </property>
</xsl:when>
<xsl:when test="@name='productVersionMinor'">
- <property name="productVersionMinor">
- <int><xsl:value-of select="substring($version,3,1)"/></int>
- </property>
+ <xsl:variable
+ name="minor"
+ select="substring-before(substring-after($version,'.'),'.')">
+ </xsl:variable>
+ <property name="productVersionMinor">
+ <int><xsl:value-of select="$minor"/></int>
+ </property>
</xsl:when>
<xsl:when test="@name='productVersionRevision'">
- <property name="productVersionRevision">
- <int><xsl:value-of select="substring($version,5,1)"/></int>
- </property>
+ <xsl:variable
+ name="revision"
+ select="substring-before(substring-after(substring-after($version,'.'),'.'),'.')">
+ </xsl:variable>
+ <property name="productVersionRevision">
+ <int><xsl:value-of select="$revision"/></int>
+ </property>
</xsl:when>
<xsl:when test="@name='productVersionSubRevision'">
- <property name="productVersionSubRevision">
- <int><xsl:value-of select="substring($version,7,1)"/></int>
- </property>
+ <xsl:variable
+ name="subrevision"
+ select="substring-after(substring-after(substring-after($version,'.'),'.'),'.')">
+ </xsl:variable>
+ <property name="productVersionSubRevision">
+ <int><xsl:value-of select="$subrevision"/></int>
+ </property>
</xsl:when>
<xsl:otherwise>
<xsl:copy>