The version field

Like most VCSs, Git has the ability to tag specific points in history as being important. Using the mngit version command ensures that the version will be automatically updated from the Git history at each update (see Lst. 4).

$ mngit version

Note

As illustrated on Lst. 3, once the mngit version command has been executed, a default version (0.1.0 for semantic version plugin) is added in the software field.

Lst. 3 Status of the .mngit.yml file
about:
    contact: <email>
    desc: <longdesc>
software:
    desc: <shortdesc>
    name: <name>
    version: 0.1.0
version:
    plugin: semantic

To detect versions, MngIt considers the last tag corresponding to certain patterns. To handle different versioning patterns, the version plugin manager is used. Currently, MngIt provide the semantic version plugin that corresponds to the semantic versioning design (e.g. tags considered are matching the '(v)?([0-9]*).([0-9]*).([0-9]*)(-.*)?' regular expression).

$ git add -A
$ git commit -m 'Add MngIt configuration file'
...
$ git tag v0.2.0
$ mngit update
Lst. 4 Status of the .mngit.yml file after the execution of the git tag command
 about:
   contact: <email>
   desc: <longdesc>
 software:
   desc: <shortdesc>
   name: <name>
   version: 0.2.0
 version:
   plugin: semantic