Template:VersionRevision: Difference between revisions

Jump to navigation Jump to search
Aligning with actual 4.0 release, and adding 5.0 placeholder
(Update to align with actual # of 3.0 releases)
(Aligning with actual 4.0 release, and adding 5.0 placeholder)
Line 1: Line 1:
<includeonly>{{#if:{{{1}}}|
<includeonly>{{#if:{{{1}}}|
{{#switch:{{{use|}}}
{{#switch:{{{use|}}}
|title={{#switch:{{{1}}}<!--pretty title format-->
|title={{#switch:{{{1}}}<!--pretty title format-->
|2.0|v2.0=2.0
|2.0|v2.0=2.0
|3.0|v3.0=3.0
|3.0|v3.0=3.0
|3.5|v3.5=3.5
|3.5|v3.5=3.5
|4.0|v4.0=4.0
|4.0|v4.0=4.0
|5350|r5350=2.0
|5.0|v5.0=5.0
|7617|r7617=3.0
|5350|r5350=2.0
|8553|r8553=3.5
|7617|r7617=3.0
|10000|r10000=4.0<!--Placeholder for unreleased 4.0-->
|8553|r8553=3.5
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
|11003|r11003=4.0
|#default=
|20000|r20000=5.0<!--Placeholder for unreleased 5.0-->
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--found a new-format git release-->
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
|{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--input is git; output in the format we received it in-->
|#default=
|{{#if:{{#regex:{{{1}}}|/^r[0-9]{1,4}$/}}<!--input is not git; detect whether we have a leading 'r'-->
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--found a new-format git release-->
|{{{1}}}<!--we do, output as-is-->
|{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--input is git; output in the format we received it in-->
|r{{{1}}}<!--we do not, add 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-->
}}
|r{{{1}}}<!--we do not, add a leading 'r'-->
}}
}}
|link|#default={{#switch:{{{1}}}<!--link format, mostly for calculations and other templates use-->
}}
|2.0|v2.0=5350
}}
|3.0|v3.0=7617<!--936 3.0 releases-->
|link|#default={{#switch:{{{1}}}<!--link format, mostly for calculations and other templates use-->
|3.5|v3.5=8553
|2.0|v2.0=5350
|4.0|v4.0=10000<!--Placeholder for unreleased 4.0-->
|3.0|v3.0=7617<!--936 3.0 releases-->
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
|3.5|v3.5=8553
|#default=
|4.0|v4.0=11003
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--found a new-format git release-->
|5.0|v5.0=20000<!--Placeholder for unreleased 5.0-->
|{{#expr:<!--basically, we're doing... (rev value of the base revision) + (build number)-->
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
{{#switch:{{#regex:{{{1}}}|/^[0-9]\.[0-9]/}}<!--switching on the first part of the rev (3.0, 4.0, etc)-->
|#default=
|2.0=5350
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--found a new-format git release-->
|3.0=7617
|{{#expr:<!--basically, we're doing... (rev value of the base revision) + (build number)-->
|3.5=8553
{{#switch:{{#regex:{{{1}}}|/^[0-9]\.[0-9]/}}<!--switching on the first part of the rev (3.0, 4.0, etc)-->
|4.0=10000
|2.0=5350
}}
|3.0=7617
+{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-([0-9]+$)/|$1}}}}
|3.5=8553
|{{#if:{{#regex:{{{1}}}|/^[r,R][0-9]{1,4}/}}
|4.0=11003
|{{#switch:{{#regex:{{{1}}}|/^[r,R]/|}}
|5.0=20000
|2.0|v2.0=5350
}}
|3.0|v3.0=7617
+{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-([0-9]+$)/|$1}}}}
|3.5|v3.5=8553
|{{#if:{{#regex:{{{1}}}|/^[r,R][0-9]{1,4}/}}
|4.0|v4.0=10000
|{{#switch:{{#regex:{{{1}}}|/^[r,R]/|}}
|#default={{#regex:{{{1}}}|/^[r,R]/|}}}}
|2.0|v2.0=5350
|{{{1}}}
|3.0|v3.0=7617
}}
|3.5|v3.5=8553
}}
|4.0|v4.0=11003
}}
|5.0|v5.0=20000
|#default={{#regex:{{{1}}}|/^[r,R]/|}}}}
|{{{1}}}
}}
}}
}}
}}|<revision missing>[[Category:Pages with VersionRevision template errors]]}}</includeonly><noinclude>
}}|<revision missing>[[Category:Pages with VersionRevision template errors]]}}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Navigation menu