VERSION

From ICE Enterprises
Jump to navigation Jump to search

displays current version of Midas or a Midas option tree

<option>  option tree [DEF="ALL"]

This macro simply displays the first line of the version.txt file found in
the root directory of the option tree specified.  This line lists the current
version of the software under that option tree.

VERSION does NOT let you switch between different versions of Midas or option
trees.

If option is "ALL" then the version information for all option trees in the
path will be listed. Do not confuse this with the switch "/ALL" which displays
the entire version.txt file.

If no version.txt file is found, an informational message is displayed saying
no version information was provided.  It is the responsibility of the person
developing the option tree to update this file.  This file may also contain
additional information about known bugs, recent modifications, or fixes since
the last version.  To view the file in its entirety assert the /ALL
switch.

The version.txt file is simply a plain text file with the version information
listed on the first line of the file. The version string should follow
"Version: " or "Version " with this format:
  <major_version>.<minor_version>.<update_version>[('.'|'-'|'_')qualifier]
    * the major/minor/(update|micro) version must be digits (integer numbers)
    * the minor version and update version are optional (but highly recommended)
    * the qualifier can be any alphanumeric, '-' (dash), or '_' (underscore).
    Some valid examples are: 1.0, 2.0.1, 3.2.0.b11, 3.6.1-02, 4.0.2_rc1
Lines that begin with a '#' are ignored when displaying the file.
To embed NeXtMidas version compatibility information (used when /CHECK is
specified) put "#VCOMP:x.y.z" on a line in the file, where "x.y.z" is the
version (e.g. 2.1.0) of NeXtMidas which the option tree is compatible with.
If the option tree is compatible with all sub versions of a major NeXtMidas
version, then specify it with an "X" (such as "2.1.X"). Multiple "#VCOMP:"
lines can be listed. (Versions of NeXtMidas prior to 2.1.0 used the old
version identifier, e.g. "19X".) Since NeXtMidas 2.1.1 it is possible to mark
an option tree as being compatible with a given version of NeXtMidas and all
later versions by using "2.1.1+" to mean that version "2.1.1" or later is
required (note that the '+' syntax may cause an error on older versions of
NeXtMidas). Since NeXtMidas 3.3.0, a finer level of option tree dependency
(including SYS) with version constraints can be specified with "#REQUIREDOPT:".

To specify the option tree(s) that an option requires in the version.txt,
use "#REQUIREDOPT:" at the beginning of a line (one per required option tree).
It should be followed by the <required_option_tree_name> and optionally
a semi-colon separated list of constraints (key=value). (Since NeXtMidas 3.3.0)

  Format is "#REQUIREDOPT:" <option_tree_name>[; constraint]*

  Where constraint is a key=value pair of the constraint name/value.
  The following constraints are currently defined:
    VERSION:
      "version"=(min_version | version_range)
      min_version   := version
      max_version   := version
      version       := major_ver('.'minor_ver('.'update_ver('.'qualifier)?)?)?
      version_range := ('[' | '(') min_version ',' max_version (']' | ')')
        use a "[" and "]" for inclusive and "(" and ")" for exclusive.

  Some examples:
    #REQUIREDOPT: SYS; version=3.3.0    ! requires SYS version 3.2.0 and later
    #REQUIREDOPT: DSP                   ! requires DSP any version

    #! to require MYOPT version 1.0.0 up to be not including 2.0.0
    #REQUIREDOPT: MYOPT; version=[1.0,2.0)

Examples:
  1. Display brief version info (first line of version.txt) for all option trees
     in the PATH:
     nM> version

  2. Display full version.txt for SYS option tree:
     nM> version/all SYS

Switches:
  /ALL          - Display the entire version.txt file
  /CHECK        - Checks the option tree for compatibility with the
                  current NeXtMidas version (since NeXtMidas 1.9.2)
  /OPTINFO      - Display option tree information parsed from version.txt
                  such as version and required option trees. (since 3.3.0)
                  See OPTION/INFO=<resname> to save to results table.

See Also: OPTION