This commit is contained in:
@@ -29,7 +29,7 @@ Parsing
|
||||
|
||||
version(PARSE <out-var> <string>)
|
||||
|
||||
Attempts to parse the version in ``<string>`` and stores the individual compoents into ``<out-var>_<component>``. If a component is not present in the given version, it will be undefined. If an error occurred, ``<out-var>_ERROR`` will be defined and contain the error message. The ``PRERELEASE`` and ``BUILD`` components support the dot-separation specifier and will be turned into a list if they are encountered.
|
||||
Attempts to parse the version in ``<string>`` and stores the individual compoents into ``<out-var>_<component>``. If a component is not present in the given version, it will be set to a false constant. If an error occurred, ``<out-var>_ERROR`` will contain the error message otherwise it will be a false constant. The ``PRERELEASE`` and ``BUILD`` components support the dot-separation specifier and will be turned into a list if they are encountered.
|
||||
|
||||
Generating
|
||||
^^^^^^^^^^
|
||||
@@ -40,7 +40,7 @@ Generating
|
||||
|
||||
version(GENERATE <out-var> [COMPRESS] [MAJOR <major>] [MINOR <minor>] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>])
|
||||
|
||||
Generates a version from the components provided and stores the result in ``<out-var>``. The components ``<major>`` and ``<minor>`` will default to ``0`` if not provided. If an error occurred, ``<out-var>_ERROR`` will be defined and contain the error message. The ``PRERELEASE`` and ``BUILD`` components support the dot-separation specifier and will be converted from a list if encountered.
|
||||
Generates a version from the components provided and stores the result in ``<out-var>``. The components ``<major>`` and ``<minor>`` will default to ``0`` if not provided. If an error occurred, ``<out-var>_ERROR`` will contain the error message otherwise it will be a false constant. The ``PRERELEASE`` and ``BUILD`` components support the dot-separation specifier and will be converted from a list if encountered.
|
||||
|
||||
Modifying
|
||||
^^^^^^^^^
|
||||
@@ -51,7 +51,7 @@ Modifying
|
||||
|
||||
version(MODIFY <out-var> <string> [COMPRESS] [MAJOR <major>] [MINOR <minor] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>])
|
||||
|
||||
Modifies the version provided in ``<string>`` with the components provided. The components ``<major>``, ``<minor>``, ``<patch>`` and ``<tweak>`` may have a prefix of ``+`` or ``-`` to add and subtract the value, or no prefix to replace. The result of this operation will be stored as a string in ``<out-var>``. If a component did not exist in the original, it will be added to the version as a replace operation. If an error occurred, ``<out-var>_ERROR`` will be defined and contain the error message.
|
||||
Modifies the version provided in ``<string>`` with the components provided. The components ``<major>``, ``<minor>``, ``<patch>`` and ``<tweak>`` may have a prefix of ``+`` or ``-`` to add and subtract the value, or no prefix to replace. The result of this operation will be stored as a string in ``<out-var>``. If a component did not exist in the original, it will be added to the version as a replace operation. If an error occurred, ``<out-var>_ERROR`` will contain the error message otherwise it will be a false constant.
|
||||
|
||||
Comparing
|
||||
^^^^^^^^^
|
||||
@@ -69,7 +69,7 @@ Compares the version ``<a>`` against ``<b>`` and stores the result in ``<out-var
|
||||
- If a component is numerical and the value is larger in ``<a>``, ``<out-var>`` will contain the componenent name prefixed by ``>``.
|
||||
- If a component is numerical and the value is larger in ``<b>``, ``<out-var>`` will contain the componenent name prefixed by ``<``.
|
||||
- If a component is alphanumerical and the value is different in either, ``<out-var>`` will contain the component name with no prefix.
|
||||
- If an error occurred, ``<out-var>_ERROR`` will be defined and contain the error message, and ``<out-var>`` will be undefined.
|
||||
- In all other cases, ``<out-var>`` will be empty.
|
||||
- If an error occurred, ``<out-var>_ERROR`` will contain the error message otherwise it will be a false constant, and ``<out-var>`` will be a false constant.
|
||||
- In all other cases, ``<out-var>`` will be a false constant.
|
||||
|
||||
There is no special handling for dot-separated ``PRERELEASE`` and ``BUILD`` component. They will be treated as if they were a string, as special handling for these is up to the application.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '1.1',
|
||||
VERSION: '1.2',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Index — version 1.1 documentation</title>
|
||||
<title>Index — version 1.2 documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
@@ -28,7 +28,7 @@
|
||||
<a href="index.html" class="icon icon-home"> version
|
||||
</a>
|
||||
<div class="version">
|
||||
1.1
|
||||
1.2
|
||||
</div>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
|
||||
+7
-7
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>version — version 1.1 documentation</title>
|
||||
<title>version — version 1.2 documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
@@ -29,7 +29,7 @@
|
||||
<a href="#" class="icon icon-home"> version
|
||||
</a>
|
||||
<div class="version">
|
||||
1.1
|
||||
1.2
|
||||
</div>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
@@ -94,21 +94,21 @@ version(<a class="reference internal" href="#compare">COMPARE</a> <out-var>
|
||||
<div class="highlight-cmake notranslate" id="parse"><div class="highlight"><pre><span></span><span class="nb">version</span><span class="p">(</span><span class="s">PARSE</span><span class="w"> </span><span class="s"><out-var></span><span class="w"> </span><span class="s"><string></span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Attempts to parse the version in <code class="docutils literal notranslate"><span class="pre"><string></span></code> and stores the individual compoents into <code class="docutils literal notranslate"><span class="pre"><out-var>_<component></span></code>. If a component is not present in the given version, it will be undefined. If an error occurred, <code class="docutils literal notranslate"><span class="pre"><out-var>_ERROR</span></code> will be defined and contain the error message. The <code class="docutils literal notranslate"><span class="pre">PRERELEASE</span></code> and <code class="docutils literal notranslate"><span class="pre">BUILD</span></code> components support the dot-separation specifier and will be turned into a list if they are encountered.</p>
|
||||
<p>Attempts to parse the version in <code class="docutils literal notranslate"><span class="pre"><string></span></code> and stores the individual compoents into <code class="docutils literal notranslate"><span class="pre"><out-var>_<component></span></code>. If a component is not present in the given version, it will be set to a false constant. If an error occurred, <code class="docutils literal notranslate"><span class="pre"><out-var>_ERROR</span></code> will contain the error message otherwise it will be a false constant. The <code class="docutils literal notranslate"><span class="pre">PRERELEASE</span></code> and <code class="docutils literal notranslate"><span class="pre">BUILD</span></code> components support the dot-separation specifier and will be turned into a list if they are encountered.</p>
|
||||
</section>
|
||||
<section id="generating">
|
||||
<h2>Generating<a class="headerlink" href="#generating" title="Permalink to this heading"></a></h2>
|
||||
<div class="highlight-cmake notranslate" id="generate"><div class="highlight"><pre><span></span><span class="nb">version</span><span class="p">(</span><span class="s">GENERATE</span><span class="w"> </span><span class="s"><out-var></span><span class="w"> </span><span class="s">[COMPRESS]</span><span class="w"> </span><span class="s">[MAJOR</span><span class="w"> </span><span class="s"><major>]</span><span class="w"> </span><span class="s">[MINOR</span><span class="w"> </span><span class="s"><minor>]</span><span class="w"> </span><span class="s">[PATCH</span><span class="w"> </span><span class="s"><patch>]</span><span class="w"> </span><span class="s">[TWEAK</span><span class="w"> </span><span class="s"><tweak>]</span><span class="w"> </span><span class="s">[PRERELEASE</span><span class="w"> </span><span class="s"><prerelease>]</span><span class="w"> </span><span class="s">[BUILD</span><span class="w"> </span><span class="s"><build>]</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Generates a version from the components provided and stores the result in <code class="docutils literal notranslate"><span class="pre"><out-var></span></code>. The components <code class="docutils literal notranslate"><span class="pre"><major></span></code> and <code class="docutils literal notranslate"><span class="pre"><minor></span></code> will default to <code class="docutils literal notranslate"><span class="pre">0</span></code> if not provided. If an error occurred, <code class="docutils literal notranslate"><span class="pre"><out-var>_ERROR</span></code> will be defined and contain the error message. The <code class="docutils literal notranslate"><span class="pre">PRERELEASE</span></code> and <code class="docutils literal notranslate"><span class="pre">BUILD</span></code> components support the dot-separation specifier and will be converted from a list if encountered.</p>
|
||||
<p>Generates a version from the components provided and stores the result in <code class="docutils literal notranslate"><span class="pre"><out-var></span></code>. The components <code class="docutils literal notranslate"><span class="pre"><major></span></code> and <code class="docutils literal notranslate"><span class="pre"><minor></span></code> will default to <code class="docutils literal notranslate"><span class="pre">0</span></code> if not provided. If an error occurred, <code class="docutils literal notranslate"><span class="pre"><out-var>_ERROR</span></code> will contain the error message otherwise it will be a false constant. The <code class="docutils literal notranslate"><span class="pre">PRERELEASE</span></code> and <code class="docutils literal notranslate"><span class="pre">BUILD</span></code> components support the dot-separation specifier and will be converted from a list if encountered.</p>
|
||||
</section>
|
||||
<section id="modifying">
|
||||
<h2>Modifying<a class="headerlink" href="#modifying" title="Permalink to this heading"></a></h2>
|
||||
<div class="highlight-cmake notranslate" id="modify"><div class="highlight"><pre><span></span><span class="nb">version</span><span class="p">(</span><span class="s">MODIFY</span><span class="w"> </span><span class="s"><out-var></span><span class="w"> </span><span class="s"><string></span><span class="w"> </span><span class="s">[COMPRESS]</span><span class="w"> </span><span class="s">[MAJOR</span><span class="w"> </span><span class="s"><major>]</span><span class="w"> </span><span class="s">[MINOR</span><span class="w"> </span><span class="s"><minor]</span><span class="w"> </span><span class="s">[PATCH</span><span class="w"> </span><span class="s"><patch>]</span><span class="w"> </span><span class="s">[TWEAK</span><span class="w"> </span><span class="s"><tweak>]</span><span class="w"> </span><span class="s">[PRERELEASE</span><span class="w"> </span><span class="s"><prerelease>]</span><span class="w"> </span><span class="s">[BUILD</span><span class="w"> </span><span class="s"><build>]</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Modifies the version provided in <code class="docutils literal notranslate"><span class="pre"><string></span></code> with the components provided. The components <code class="docutils literal notranslate"><span class="pre"><major></span></code>, <code class="docutils literal notranslate"><span class="pre"><minor></span></code>, <code class="docutils literal notranslate"><span class="pre"><patch></span></code> and <code class="docutils literal notranslate"><span class="pre"><tweak></span></code> may have a prefix of <code class="docutils literal notranslate"><span class="pre">+</span></code> or <code class="docutils literal notranslate"><span class="pre">-</span></code> to add and subtract the value, or no prefix to replace. The result of this operation will be stored as a string in <code class="docutils literal notranslate"><span class="pre"><out-var></span></code>. If a component did not exist in the original, it will be added to the version as a replace operation. If an error occurred, <code class="docutils literal notranslate"><span class="pre"><out-var>_ERROR</span></code> will be defined and contain the error message.</p>
|
||||
<p>Modifies the version provided in <code class="docutils literal notranslate"><span class="pre"><string></span></code> with the components provided. The components <code class="docutils literal notranslate"><span class="pre"><major></span></code>, <code class="docutils literal notranslate"><span class="pre"><minor></span></code>, <code class="docutils literal notranslate"><span class="pre"><patch></span></code> and <code class="docutils literal notranslate"><span class="pre"><tweak></span></code> may have a prefix of <code class="docutils literal notranslate"><span class="pre">+</span></code> or <code class="docutils literal notranslate"><span class="pre">-</span></code> to add and subtract the value, or no prefix to replace. The result of this operation will be stored as a string in <code class="docutils literal notranslate"><span class="pre"><out-var></span></code>. If a component did not exist in the original, it will be added to the version as a replace operation. If an error occurred, <code class="docutils literal notranslate"><span class="pre"><out-var>_ERROR</span></code> will contain the error message otherwise it will be a false constant.</p>
|
||||
</section>
|
||||
<section id="comparing">
|
||||
<h2>Comparing<a class="headerlink" href="#comparing" title="Permalink to this heading"></a></h2>
|
||||
@@ -122,8 +122,8 @@ version(<a class="reference internal" href="#compare">COMPARE</a> <out-var>
|
||||
<li><p>If a component is numerical and the value is larger in <code class="docutils literal notranslate"><span class="pre"><a></span></code>, <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> will contain the componenent name prefixed by <code class="docutils literal notranslate"><span class="pre">></span></code>.</p></li>
|
||||
<li><p>If a component is numerical and the value is larger in <code class="docutils literal notranslate"><span class="pre"><b></span></code>, <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> will contain the componenent name prefixed by <code class="docutils literal notranslate"><span class="pre"><</span></code>.</p></li>
|
||||
<li><p>If a component is alphanumerical and the value is different in either, <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> will contain the component name with no prefix.</p></li>
|
||||
<li><p>If an error occurred, <code class="docutils literal notranslate"><span class="pre"><out-var>_ERROR</span></code> will be defined and contain the error message, and <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> will be undefined.</p></li>
|
||||
<li><p>In all other cases, <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> will be empty.</p></li>
|
||||
<li><p>If an error occurred, <code class="docutils literal notranslate"><span class="pre"><out-var>_ERROR</span></code> will contain the error message otherwise it will be a false constant, and <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> will be a false constant.</p></li>
|
||||
<li><p>In all other cases, <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> will be a false constant.</p></li>
|
||||
</ul>
|
||||
<p>There is no special handling for dot-separated <code class="docutils literal notranslate"><span class="pre">PRERELEASE</span></code> and <code class="docutils literal notranslate"><span class="pre">BUILD</span></code> component. They will be treated as if they were a string, as special handling for these is up to the application.</p>
|
||||
</section>
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Search — version 1.1 documentation</title>
|
||||
<title>Search — version 1.2 documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<a href="index.html" class="icon icon-home"> version
|
||||
</a>
|
||||
<div class="version">
|
||||
1.1
|
||||
1.2
|
||||
</div>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="#" method="get">
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Search.setIndex({"docnames": ["index"], "filenames": ["index.rst"], "titles": ["version"], "terms": {"pure": 0, "cmake": 0, "support": 0, "semant": 0, "2": 0, "0": 0, "1": 0, "other": 0, "format": 0, "out": 0, "var": 0, "string": 0, "compress": 0, "major": 0, "minor": 0, "patch": 0, "tweak": 0, "prereleas": 0, "build": 0, "b": 0, "The": 0, "follow": 0, "construct": 0, "ar": 0, "current": 0, "pre": 0, "releas": 0, "attempt": 0, "store": 0, "individu": 0, "compoent": 0, "_": 0, "compon": 0, "If": 0, "present": 0, "given": 0, "undefin": 0, "an": 0, "error": 0, "occur": 0, "_error": 0, "defin": 0, "contain": 0, "messag": 0, "from": 0, "provid": 0, "result": 0, "default": 0, "mai": 0, "have": 0, "prefix": 0, "add": 0, "subtract": 0, "valu": 0, "replac": 0, "thi": 0, "oper": 0, "did": 0, "exist": 0, "origin": 0, "ad": 0, "against": 0, "evalu": 0, "order": 0, "should": 0, "expect": 0, "onli": 0, "componen": 0, "name": 0, "numer": 0, "larger": 0, "alphanumer": 0, "differ": 0, "either": 0, "In": 0, "all": 0, "case": 0, "empti": 0, "dot": 0, "separ": 0, "specifi": 0, "turn": 0, "list": 0, "thei": 0, "encount": 0, "convert": 0, "There": 0, "special": 0, "handl": 0, "treat": 0, "were": 0, "up": 0, "applic": 0}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"version": 0, "synopsi": 0, "pars": 0, "gener": 0, "modifi": 0, "compar": 0}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
|
||||
Search.setIndex({"docnames": ["index"], "filenames": ["index.rst"], "titles": ["version"], "terms": {"pure": 0, "cmake": 0, "support": 0, "semant": 0, "2": 0, "0": 0, "1": 0, "other": 0, "format": 0, "out": 0, "var": 0, "string": 0, "compress": 0, "major": 0, "minor": 0, "patch": 0, "tweak": 0, "prereleas": 0, "build": 0, "b": 0, "The": 0, "follow": 0, "construct": 0, "ar": 0, "current": 0, "pre": 0, "releas": 0, "attempt": 0, "store": 0, "individu": 0, "compoent": 0, "_": 0, "compon": 0, "If": 0, "present": 0, "given": 0, "undefin": [], "an": 0, "error": 0, "occur": 0, "_error": 0, "defin": [], "contain": 0, "messag": 0, "from": 0, "provid": 0, "result": 0, "default": 0, "mai": 0, "have": 0, "prefix": 0, "add": 0, "subtract": 0, "valu": 0, "replac": 0, "thi": 0, "oper": 0, "did": 0, "exist": 0, "origin": 0, "ad": 0, "against": 0, "evalu": 0, "order": 0, "should": 0, "expect": 0, "onli": 0, "componen": 0, "name": 0, "numer": 0, "larger": 0, "alphanumer": 0, "differ": 0, "either": 0, "In": 0, "all": 0, "case": 0, "empti": [], "dot": 0, "separ": 0, "specifi": 0, "turn": 0, "list": 0, "thei": 0, "encount": 0, "convert": 0, "There": 0, "special": 0, "handl": 0, "treat": 0, "were": 0, "up": 0, "applic": 0, "set": 0, "fals": 0, "constant": 0, "otherwis": 0}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"version": 0, "synopsi": 0, "pars": 0, "gener": 0, "modifi": 0, "compar": 0}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
|
||||
Reference in New Issue
Block a user