Template:VersionRevision: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
(Update to attempt to handle 3.5 release, and prep for 4.0)
mNo edit summary
 
(26 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1}}}|
<includeonly>{{#if:{{{1}}}|
{{#switch:{{{use|}}}
{{#switch:{{{use|}}}
|title={{#switch:{{{1}}}<!--pretty title format-->
|title={{#switch:{{#regex:{{{1}}}@|/^[rRvV]/|}}<!--pretty title format-->
|2.0|v2.0=2.0
|2.0@=2.0
|3.0|v3.0=3.0
|3.0@=3.0
|3.5|v3.5=3.5
|3.5@=3.5
|4.0|v4.0=4.0
|4.0@=4.0
|5350|r5350=2.0
|4.0.1@=4.0.1
|7617|r7617=3.0
|4.0.2@=4.0.2
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
|5.0@=5.0
|#default=
|5384@=2.0
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--found a new-format git release-->
|7615@=3.0
|{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--input is git; output in the format we received it in-->
|8551@=3.5
|{{#if:{{#regex:{{{1}}}|/^r[0-9]{1,4}$/}}<!--input is not git; detect whether we have a leading 'r'-->
|11001@=4.0
|{{{1}}}<!--we do, output as-is-->
|17728@=5.0-rc
|r{{{1}}}<!--we do not, add a leading 'r'-->
|20509@=5.0
}}
|#default=
}}
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-(rc-)?[0-9]+.*$/}}<!--found a new-format git release-->
}}
|{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-(rc-)?[0-9]+.*$/}}<!--input is git; output in the format we received it in-->
|link|#default={{#switch:{{{1}}}<!--link format, mostly for calculations and other templates use-->
|{{#if:{{#regex:{{{1}}}|/^r[0-9]{1,4}$/}}<!--input is not git; detect whether we have a leading 'r'-->
|2.0|v2.0=5350
|{{{1}}}<!--we do, output as-is-->
|3.0|v3.0=7617
|r{{{1}}}<!--we do not, add a leading 'r'-->
|3.5|v3.5=8528<!--Estimated from 911 current releases-->
}}
|4.0|v4.0=10000<!--Actual value unknown, using far forward revision for now.-->
}}
<!--switch cannot handle regex, so anything more complicated than straight match goes into default-->
}}
|#default=
|link|#default={{#switch:{{#regex:{{{1}}}@|/^[vV]/|}}<!--link format, mostly for calculations and other templates use-->
{{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-[0-9]+$/}}<!--found a new-format git release-->
|2.0@=5384
|{{#expr:<!--basically, we're doing... (rev value of the base revision) + (build number)-->
|3.0@=7615
{{#switch:{{#regex:{{{1}}}|/^[0-9\.[0-9]/}}<!--switching on the first part of the rev (3.0, 4.0, etc)-->
|3.5@=8551
|3.0=7617
|4.0@|4.0.1@|4.0.2@=11001
}}
|5.0@=20509
+{{#regex:{{{1}}}|/^[0-9]\.[0-9]\-([0-9]+$)/|$1}}}}
|#default=
|{{#if:{{#regex:{{{1}}}|/^[r,R][0-9]{1,4}/}}
{{#if:{{#regex:{{{1}}}|/^[vV]?[0-9]\.[0-9]\.?[0-9]?\-(rc-)?[0-9]+.*$/}}<!--found a new-format git release-->
|{{#switch:{{#regex:{{{1}}}|/^[r,R]/|}}
|{{#expr:<!--basically, we're doing... (rev value of the base revision) + (build number)-->
|2.0|v2.0=5350
{{#switch:{{#regex:{{{1}}}|/^[vV]?[0-9]\.[0-9]\.?[0-9]?(-rc)?/}}@<!--switching on the first part of the rev (3.0, 4.0, etc)-->
|3.0|v3.0=7617
|2.0@=5384
|#default={{#regex:{{{1}}}|/^[r,R]/|}}}}
|3.0@=7615
|{{{1}}}
|3.5@=8551
}}
|4.0@|4.0.1@|4.0.2@=11001
}}
|5.0-rc@=17728
}}
|5.0@=20509
}}|<revision missing>[[Category:Pages with VersionRevision template errors]]}}</includeonly><noinclude>
}}
+{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-(rc-)?([0-9]+).*$/|$2}}}}
|{{#if:{{#regex:{{{1}}}|/^[vV][0-9]{1,4}/}}
|{{#switch:{{#regex:{{{1}}}@|/^[vV]/|}}
|2.0@=5354
|3.0@=7615
|3.5@=8551
|4.0@|4.0.1@|4.0.2@=11001
|5.0-rc-@=17728
|5.0@=20509
|#default={{#regex:{{{1}}}|/^[rRvV]/|}}}}
|{{{1}}}
}}
}}
}}
}}|<revision missing>{{#if:{{#var:isdoc}}||[[Category:Pages with VersionRevision template errors]]}}}}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>
6,576

edits

Navigation menu