This commit is contained in:
@@ -8,9 +8,9 @@ Synopsis
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
version(`PARSE`_ <out-var> <string>)
|
||||
version(`PARSE`_ <out-var> [REQUIRE [PATCH|TWEAK][;...]] <string>)
|
||||
version(`GENERATE`_ <out-var> [COMPRESS] [MAJOR <major>] [MINOR <minor>] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>])
|
||||
version(`MODIFY`_ <out-var> <string> [COMPRESS] [MAJOR <major>] [MINOR <minor] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>])
|
||||
version(`MODIFY`_ <out-var> <string> [COMPRESS] [MAJOR <major>] [MINOR <minor] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>] [REQUIRE [PATCH|TWEAK][;...]])
|
||||
version(`COMPARE`_ <out-var> <a> <b>)
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ Parsing
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
version(PARSE <out-var> <string>)
|
||||
version(PARSE <out-var> [REQUIRE [PATCH|TWEAK][;...]] <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 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.
|
||||
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. The optional ``REQUIRE`` allows forcing the components ``PATCH`` and ``TWEAK`` to always be defined.
|
||||
|
||||
Generating
|
||||
^^^^^^^^^^
|
||||
@@ -49,9 +49,9 @@ Modifying
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
version(MODIFY <out-var> <string> [COMPRESS] [MAJOR <major>] [MINOR <minor] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>])
|
||||
version(MODIFY <out-var> <string> [COMPRESS] [MAJOR <major>] [MINOR <minor] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>] [REQUIRE [PATCH|TWEAK][;...]])
|
||||
|
||||
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.
|
||||
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. The optional ``REQUIRE`` allows forcing the components ``PATCH`` and ``TWEAK`` to always be defined.
|
||||
|
||||
Comparing
|
||||
^^^^^^^^^
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '1.2.2',
|
||||
VERSION: '1.3.0',
|
||||
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.2.2 documentation</title>
|
||||
<title>Index — version 1.3.0 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.2.2
|
||||
1.3.0
|
||||
</div>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
|
||||
+8
-8
@@ -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.2.2 documentation</title>
|
||||
<title>version — version 1.3.0 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.2.2
|
||||
1.3.0
|
||||
</div>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
@@ -80,9 +80,9 @@
|
||||
<p>Generate, parse and modify versions purely with CMake. Supports Semantic Versioning 2.0.0, 1.0.0 and other version formats.</p>
|
||||
<section id="synopsis">
|
||||
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this heading"></a></h2>
|
||||
<pre class="literal-block">version(<a class="reference internal" href="#parse">PARSE</a> <out-var> <string>)
|
||||
<pre class="literal-block">version(<a class="reference internal" href="#parse">PARSE</a> <out-var> [REQUIRE [PATCH|TWEAK][;...]] <string>)
|
||||
version(<a class="reference internal" href="#generate">GENERATE</a> <out-var> [COMPRESS] [MAJOR <major>] [MINOR <minor>] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>])
|
||||
version(<a class="reference internal" href="#modify">MODIFY</a> <out-var> <string> [COMPRESS] [MAJOR <major>] [MINOR <minor] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>])
|
||||
version(<a class="reference internal" href="#modify">MODIFY</a> <out-var> <string> [COMPRESS] [MAJOR <major>] [MINOR <minor] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>] [REQUIRE [PATCH|TWEAK][;...]])
|
||||
version(<a class="reference internal" href="#compare">COMPARE</a> <out-var> <a> <b>)</pre>
|
||||
<p>The following version constructs are currently supported:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o"><</span><span class="n">major</span><span class="o">></span> <span class="s2">"."</span> <span class="o"><</span><span class="n">minor</span><span class="o">></span> <span class="p">[</span><span class="s2">"."</span> <span class="o"><</span><span class="n">patch</span><span class="o">></span> <span class="p">[</span><span class="s2">"."</span> <span class="o"><</span><span class="n">tweak</span><span class="o">></span><span class="p">]]</span> <span class="p">[[</span><span class="s2">"-"</span><span class="p">]</span> <span class="o"><</span><span class="n">pre</span><span class="o">-</span><span class="n">release</span><span class="o">></span> <span class="p">[</span><span class="s2">"."</span> <span class="o"><</span><span class="n">pre</span><span class="o">-</span><span class="n">release</span><span class="o">></span> <span class="p">[</span><span class="o">...</span><span class="p">]]]</span> <span class="p">[</span><span class="s2">"+"</span> <span class="o"><</span><span class="n">build</span><span class="o">></span> <span class="p">[</span><span class="s2">"."</span> <span class="o"><</span><span class="n">build</span><span class="o">></span> <span class="p">[</span><span class="o">...</span><span class="p">]]]</span>
|
||||
@@ -91,10 +91,10 @@ version(<a class="reference internal" href="#compare">COMPARE</a> <out-var>
|
||||
</section>
|
||||
<section id="parsing">
|
||||
<h2>Parsing<a class="headerlink" href="#parsing" title="Permalink to this heading"></a></h2>
|
||||
<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>
|
||||
<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">[REQUIRE</span><span class="w"> </span><span class="s">[PATCH|TWEAK][;...]]</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 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>
|
||||
<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. The optional <code class="docutils literal notranslate"><span class="pre">REQUIRE</span></code> allows forcing the components <code class="docutils literal notranslate"><span class="pre">PATCH</span></code> and <code class="docutils literal notranslate"><span class="pre">TWEAK</span></code> to always be defined.</p>
|
||||
</section>
|
||||
<section id="generating">
|
||||
<h2>Generating<a class="headerlink" href="#generating" title="Permalink to this heading"></a></h2>
|
||||
@@ -105,10 +105,10 @@ version(<a class="reference internal" href="#compare">COMPARE</a> <out-var>
|
||||
</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>
|
||||
<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="w"> </span><span class="s">[REQUIRE</span><span class="w"> </span><span class="s">[PATCH|TWEAK][;...]]</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 contain the error message otherwise it will be a false constant.</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. The optional <code class="docutils literal notranslate"><span class="pre">REQUIRE</span></code> allows forcing the components <code class="docutils literal notranslate"><span class="pre">PATCH</span></code> and <code class="docutils literal notranslate"><span class="pre">TWEAK</span></code> to always be defined.</p>
|
||||
</section>
|
||||
<section id="comparing">
|
||||
<h2>Comparing<a class="headerlink" href="#comparing" title="Permalink to this heading"></a></h2>
|
||||
|
||||
+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.2.2 documentation</title>
|
||||
<title>Search — version 1.3.0 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.2.2
|
||||
1.3.0
|
||||
</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": [], "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}})
|
||||
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": 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": [], "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, "requir": 0, "option": 0, "allow": 0, "forc": 0, "alwai": 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