From 2948b4fd4f6f489cfc0c59153135b4a47ba745ba Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 4 Jul 2022 20:46:35 +0000 Subject: [PATCH] 08392721a910ad93305b108d93a3a5957e86b342 --- _sources/index.rst.txt | 11 +++++------ index.html | 10 +++++----- searchindex.js | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt index 23fc3d5..a9382c0 100644 --- a/_sources/index.rst.txt +++ b/_sources/index.rst.txt @@ -18,9 +18,7 @@ The following version constructs are currently supported: .. code-block:: - "." ["." ["." ]] - "." ["." ["." ]] [["-"] ] ["+" ] - + "." ["." ["." ]] [["-"] ["." [...]]] ["+" ["." [...]]] Parsing ^^^^^^^ @@ -31,7 +29,7 @@ Parsing version(PARSE ) -Attempts to parse the version in ```` and stores the individual compoents into ``_``. If a component is not present in the given version, it will be undefined. If an error occurred, ``_ERROR`` will be defined and contain the error message. +Attempts to parse the version in ```` and stores the individual compoents into ``_``. If a component is not present in the given version, it will be undefined. If an error occurred, ``_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. Generating ^^^^^^^^^^ @@ -42,7 +40,7 @@ Generating version(GENERATE [COMPRESS] [MAJOR ] [MINOR ] [PATCH ] [TWEAK ] [PRERELEASE ] [BUILD ]) -Generates a version from the components provided and stores the result in ````. The components ```` and ```` will default to ``0`` if not provided. If an error occurred, ``_ERROR`` will be defined and contain the error message. +Generates a version from the components provided and stores the result in ````. The components ```` and ```` will default to ``0`` if not provided. If an error occurred, ``_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. Modifying ^^^^^^^^^ @@ -71,6 +69,7 @@ Compares the version ```` against ```` and stores the result in ````, ```` will contain the componenent name prefixed by ``>``. - If a component is numerical and the value is larger in ````, ```` will contain the componenent name prefixed by ``<``. - If a component is alphanumerical and the value is different in either, ```` will contain the component name with no prefix. -- In all other cases, ```` will be empty. - If an error occurred, ``_ERROR`` will be defined and contain the error message, and ```` will be undefined. +- In all other cases, ```` will be empty. +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. diff --git a/index.html b/index.html index 35b3f05..113265c 100644 --- a/index.html +++ b/index.html @@ -85,8 +85,7 @@ version(GENERATE <out-var& version(MODIFY <out-var> <string> [COMPRESS] [MAJOR <major>] [MINOR <minor] [PATCH <patch>] [TWEAK <tweak>] [PRERELEASE <prerelease>] [BUILD <build>]) version(COMPARE <out-var> <a> <b>)

The following version constructs are currently supported:

-
<major> "." <minor> ["." <patch> ["." <tweak>]]
-<major> "." <minor> ["." <patch> ["." <tweak>]] [["-"] <pre-release>] ["+" <build>]
+
<major> "." <minor> ["." <patch> ["." <tweak>]] [["-"] <pre-release> ["." <pre-release> [...]]] ["+" <build> ["." <build> [...]]]
 
@@ -95,14 +94,14 @@ version(COMPARE <out-var>
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.

+

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.

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.

+

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.

Modifying

@@ -123,9 +122,10 @@ version(COMPARE <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.

  • -
  • In all other cases, <out-var> will be empty.

  • 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.

  • +

    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.

    diff --git a/searchindex.js b/searchindex.js index bb60bf9..fb306d9 100644 --- a/searchindex.js +++ b/searchindex.js @@ -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}, "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}}) \ No newline at end of file +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}}) \ No newline at end of file