Template:VersionRevision: Difference between revisions
Jump to navigation
Jump to search
(Made changes suggested in the Discussion page. It's a simple numbering change so it shouldn't break anything, but everyone please check!) |
(OK, this should now handles the 5.0-rc releases and alternate branch releases correctly.) |
||
Line 13: | Line 13: | ||
|8551|r8551=3.5 | |8551|r8551=3.5 | ||
|11001|r11001=4.0 | |11001|r11001=4.0 | ||
| | |17728|r17728=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]?\-[0-9]+$/}}<!--found a new-format git release--> | {{#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]?\-[0-9]+$/}}<!--input is git; output in the format we received it in--> | |{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-(rc-)?[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 29: | Line 29: | ||
|3.5|v3.5=8551<!--2450 3.5 era releases--> | |3.5|v3.5=8551<!--2450 3.5 era releases--> | ||
|4.0|v4.0|4.0.1|v4.0.1|4.0.2|v4.0.2=11001 | |4.0|v4.0|4.0.1|v4.0.1|4.0.2|v4.0.2=11001 | ||
|5.0|v5.0= | |5.0|v5.0=17728<!--5.0-rc releases, still need to account for actual 5.0, may be a pain--> | ||
<!--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]?\-[0-9]+$/}}<!--found a new-format git release--> | {{#if:{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-(rc-)?[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]\.?[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)--> | ||
Line 39: | Line 39: | ||
|3.5=8551 | |3.5=8551 | ||
|4.0|4.0.1|4.0.2=11001 | |4.0|4.0.1|4.0.2=11001 | ||
|5.0= | |5.0=17728 | ||
}} | }} | ||
+{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-([0-9]+$ | +{{#regex:{{{1}}}|/^[0-9]\.[0-9]\.?[0-9]?\-(rc-)?([0-9]+).*$/|$2}}}} | ||
|{{#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 48: | Line 48: | ||
|3.5|v3.5=8551 | |3.5|v3.5=8551 | ||
|4.0|v4.0|4.0.1|v4.0.1=11001 | |4.0|v4.0|4.0.1|v4.0.1=11001 | ||
|5.0|v5.0= | |5.0|v5.0=17728 | ||
|#default={{#regex:{{{1}}}|/^[r,R]/|}}}} | |#default={{#regex:{{{1}}}|/^[r,R]/|}}}} | ||
|{{{1}}} | |{{{1}}} |