Skip to content

Commit

Permalink
Simplify patching version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
sydb committed Oct 29, 2023
1 parent 739d94b commit d4b77e3
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions profiles/readme/html/to.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,8 @@ of this software, even if advised of the possibility of such damage.</p>
But the Guidelines we are trying to point to always have it. So here if we find only major-
dot-minor (rather than major-dot-minor-dot-patch), we append a ".0".
-->
<xsl:variable name="version" as="xs:string">
<xsl:analyze-string select="$version_from_filename" regex="^([0-9]+\.[0-9]+)([aαbβ]?)$">
<xsl:matching-substring>
<xsl:sequence select="regex-group(1)||'.0'||regex-group(2)"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:sequence select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:variable>
<xsl:variable name="version" as="xs:string"
select="replace( $version_from_filename, '^([0-9]+\.[0-9]+)([aαbβ]?)$', '$1.0$2')"/>
<!-- $versionZero is true() iff the major number is '0'. -->
<xsl:variable name="versionZero" select="substring-before( $version, '.') eq '0'" as="xs:boolean"/>
<xsl:variable name="testVersionedDocument" select="concat( $vault,'/',$version,'/VERSION')"/>
Expand Down

0 comments on commit d4b77e3

Please sign in to comment.