This project intends to interpret the current commit of the project and let it available to the C code in a easy format. It bases on the tags declared by developer on the git tree.
A concatenated string containing the following fields in order:
(Name)(Version Numbers)(Release Candidate)
Examples:
- V1.3.5
- VERSION_2.4-RC6
A non-numeric sequence. '-' is a forbidden character to this field.
Examples:
- V
- VERSION
- PROJECT_NAME
A sequence of positive decimal numbers separated by any non-numeric separator (except '-').
The maximum quantity of numbers in this sequence is given by the definition TAG_MAX_VERSION_NUMBERS (default = 4).
Examples:
- 1.0.5
- 10,6/7x8
The tag may be a release or even a release candidate. To specify a release candidate, this field must be present. It must be started by sequence '-rc', which is case insensitive (ie. '-rc' will be the same as '-RC' or '-rC' or '-Rc'), followed by a positive decimal number.
Examples:
- -rc15
- -Rc2
The output of the parsing task will be composed by following fields:
It gives the current commit hash in the short format (7 hex characters).
Raw output of command git describe --dirty=-dirty
Version numbers are available to the array version_numbers, while the number of used position is given at used_version_numbers
The number of release candidate. Negative means it's not a release candidate.
How many commits were made after the nearest tag behind it.
Signals false if working tree clean and true if there are uncommited changes in the project files.