Difference between revisions of "Template:Check version/ver"

From Kerbal Space Program Wiki
Jump to: navigation, search
(+missing conversions; +two tests for a quick check;)
m (Add 1.7.3)
 
(18 intermediate revisions by 3 users not shown)
Line 14: Line 14:
 
|50=1.0.1
 
|50=1.0.1
 
|51=1.0.2
 
|51=1.0.2
|52=1.1
+
|52=1.0.3
 +
|53=1.0.4
 +
|54=1.0.5
 +
|55=1.1
 +
|56=1.1.1
 +
|57=1.1.2
 +
|58=1.1.3
 +
|59=1.2
 +
|60=1.2.1
 +
|61=1.2.2
 +
|62=1.3
 +
|63=1.3.1
 +
|64=1.4
 +
|65=1.4.1
 +
|66=1.4.2
 +
|67=1.4.3
 +
|68=1.4.4
 +
|69=1.4.5
 +
|70=1.5
 +
|71=1.5.1
 +
|72=1.6
 +
|73=1.6.1
 +
|74=1.7
 +
|75=1.7.1
 +
|76=1.7.2
 +
|77=1.7.3
 +
|78=1.8
 
|#default={{{2|0}}}}}|{{Check version/Cur}}}}</includeonly><noinclude>This template converts a revision number into version number. Is only internally required. After each update the next version should be added to be in sync with {{Tl|Check version/Rev}}. It should return the version number used by Squad and <tt><nowiki>{{Check version/Rev|{{Check version/ver|X}}}} == X</nowiki></tt>.
 
|#default={{{2|0}}}}}|{{Check version/Cur}}}}</includeonly><noinclude>This template converts a revision number into version number. Is only internally required. After each update the next version should be added to be in sync with {{Tl|Check version/Rev}}. It should return the version number used by Squad and <tt><nowiki>{{Check version/Rev|{{Check version/ver|X}}}} == X</nowiki></tt>.
  
 
== Tests ==
 
== Tests ==
* Current: {{#ifeq: {{Check version/Rev|{{Check version/ver|{{Check version/Cur}}}}}}|{{Check version/Cur}}|{{ColorBox|green}} Ok!|{{ColorBox|red}} Failure!}}
+
* Current: {{#ifeq: {{Check version/ver|{{Check version/Rev|{{Check version/Cur}}}}}}|{{Check version/Cur}}|{{ColorBox|green}} Ok!|{{ColorBox|red}} Failure!}}
* Future (rev + 1): {{#ifeq: {{Check version/Rev|{{Check version/ver|{{#expr:{{Check version/Cur}} + 1}}}}}}|{{#expr: {{Check version/Cur}} + 1}}|{{ColorBox|green}} Ok!|{{ColorBox|red}} Failure!}}
+
* Future (rev + 1): {{#ifeq: {{Check version/Rev|{{Check version/ver|{{#expr:{{Check version/Rev|{{Check version/Cur}}}} + 1}}}}}}|{{#expr: {{Check version/Rev|{{Check version/Cur}}}} + 1}}|{{ColorBox|green}} Ok!|{{ColorBox|red}} Failure!}}
  
 
[[Category:Metatemplates]]</noinclude>
 
[[Category:Metatemplates]]</noinclude>

Latest revision as of 09:11, 12 July 2019

This template converts a revision number into version number. Is only internally required. After each update the next version should be added to be in sync with {{Check version/Rev}}. It should return the version number used by Squad and {{Check version/Rev|{{Check version/ver|X}}}} == X.

Tests

  • Current:     Ok!
  • Future (rev + 1):     Ok!