NAntContrib Help Task Reference <version> | v0.91-beta1 |
[This is preliminary documentation and subject to change.]
Increments a four-part version number stored in a text file. The resulting version number is written back to the file and exposed using NAnt properties.
The version number format in the text file is Major.Minor.Build.Revision, e.g. 1.0.5.25.
Major | Set in file. |
Minor | Set in file. |
Build | Can be incremented by setting the buildtype parameter. |
Revision | Can be incremented by setting the revisiontype parameter. |
The following NAnt properties are created:
prefix .version |
The complete version number, i.e. Major.Minor.Build.Revision |
prefix .major |
The major component of the version number. |
prefix .minor |
The minor component of the version number. |
prefix .build |
The build component of the version number. |
prefix .revision |
The revision component of the version number. |
Attribute | Type | Description | Required |
---|---|---|---|
buildtype | BuildNumberAlgorithm | The algorithm for generating build number. The default is MonthDay . |
False |
path | file | Path to the file containing the current version number. The default file is 'build.number' in the project base directory. |
False |
prefix | string | The string to prefix the properties with. The default is 'buildnumber.' . |
False |
revisiontype | RevisionNumberAlgorithm | The algorithm for generating revision number. The default is Automatic . |
False |
startdate | datetime | Start of project. Date from which to calculate build number. Required if MonthDay is used as buildtype . |
False |
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False |
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False |
unless | bool | Opposite of if . If false then the task will be executed; otherwise, skipped. The default is false. |
False |
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False |