Template:VersionRevision: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Try this again, just output 4.0 for 4.0.1 inputs.)
No edit summary
Line 14: Line 14:
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
|#default=
|#default=
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--found a new-format git release-->
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-[0-9]+$/}}<!--found a new-format git release-->
|{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--input is git; output in the format we received it in-->
|{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-[0-9]+$/}}<!--input is git; output in the format we received it in-->
|{{#if:{{#regex:{{{1}}}|/^r[0-9]{1,4}$/}}<!--input is not git; detect whether we have a leading 'r'-->
|{{#if:{{#regex:{{{1}}}|/^r[0-9]{1,4}$/}}<!--input is not git; detect whether we have a leading 'r'-->
|{{{1}}}<!--we do, output as-is-->
|{{{1}}}<!--we do, output as-is-->
Line 26: Line 26:
|3.0|v3.0=7617<!--936 3.0 releases-->
|3.0|v3.0=7617<!--936 3.0 releases-->
|3.5|v3.5=8553
|3.5|v3.5=8553
|4.0|v4.0=11003
|4.0|v4.0|4.0.1|v4.0.1=11003
|5.0|v5.0=20000<!--Placeholder for unreleased 5.0-->
|5.0|v5.0=20000<!--Placeholder for unreleased 5.0-->
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
|#default=
|#default=
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--found a new-format git release-->
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-[0-9]+$/}}<!--found a new-format git release-->
|{{#expr:<!--basically, we're doing... (rev value of the base revision) + (build number)-->
|{{#expr:<!--basically, we're doing... (rev value of the base revision) + (build number)-->
{{#switch:{{#regex:{{{1}}}|/^[0-9]\.[0-9]/}}<!--switching on the first part of the rev (3.0, 4.0, etc)-->
{{#switch:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?/}}<!--switching on the first part of the rev (3.0, 4.0, etc)-->
|2.0=5350
|2.0=5350
|3.0=7617
|3.0=7617
|3.5=8553
|3.5=8553
|4.0=11003
|4.0|4.0.1=11003
|5.0=20000
|5.0=20000
}}
}}
+{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-([0-9]+$)/|$1}}}}
+{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-([0-9]+$)/|$1}}}}
|{{#if:{{#regex:{{{1}}}|/^[r,R][0-9]{1,4}/}}
|{{#if:{{#regex:{{{1}}}|/^[r,R][0-9]{1,4}/}}
|{{#switch:{{#regex:{{{1}}}|/^[r,R]/|}}
|{{#switch:{{#regex:{{{1}}}|/^[r,R]/|}}
Line 45: Line 45:
|3.0|v3.0=7617
|3.0|v3.0=7617
|3.5|v3.5=8553
|3.5|v3.5=8553
|4.0|v4.0=11003
|4.0|v4.0|4.0.1|v4.0.1=11003
|5.0|v5.0=20000
|5.0|v5.0=20000
|#default={{#regex:{{{1}}}|/^[r,R]/|}}}}
|#default={{#regex:{{{1}}}|/^[r,R]/|}}}}

Navigation menu