79,225
edits
(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--> | |||
|2.0|v2.0=2.0 | |||
|3.0|v3.0=3.0 | |||
|3.5|v3.5=3.5 | |||
|4.0|v4.0=4.0 | |||
|5.0|v5.0=5.0 | |||
|5350|r5350=2.0 | |||
|7617|r7617=3.0 | |||
|8553|r8553=3.5 | |||
|11003|r11003=4.0 | |||
|20000|r20000=5.0<!--Placeholder for unreleased 5.0--> | |||
<!--switch cannot handle regex, so anything more complicated than straight match goes into default--> | |||
|#default= | |||
{{#if:{{#regex:{{{1}}}|/^[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--> | |||
|{{#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--> | |||
|3.5|v3.5=8553 | |||
|4.0|v4.0=11003 | |||
|5.0|v5.0=20000<!--Placeholder for unreleased 5.0--> | |||
<!--switch cannot handle regex, so anything more complicated than straight match goes into default--> | |||
|#default= | |||
{{#if:{{#regex:{{{1}}}|/^[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)--> | |||
{{#switch:{{#regex:{{{1}}}|/^[0-9]\.[0-9]/}}<!--switching on the first part of the rev (3.0, 4.0, etc)--> | |||
|2.0=5350 | |||
|3.0=7617 | |||
|3.5=8553 | |||
|4.0=11003 | |||
|5.0=20000 | |||
}} | |||
+{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-([0-9]+$)/|$1}}}} | |||
|{{#if:{{#regex:{{{1}}}|/^[r,R][0-9]{1,4}/}} | |||
|{{#switch:{{#regex:{{{1}}}|/^[r,R]/|}} | |||
|2.0|v2.0=5350 | |||
|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> |