Summary
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.
- Assembly
- NAnt
.Contrib .dll - Namespace
- NAnt
.Contrib .Tasks - Base Types
-
- Task
graph BT
Type-->Base0["Task"]
Type["VersionTask"]
class Type type-node
Syntax
[TaskName("version")]
public class VersionTask : Task
Remarks
The version number format in the text file is Major.Minor.Build.Revision, e.g. 1.0.5.25.
| Major |
| Minor |
| Build |
| Revision |
The following NAnt properties are created:
prefix.version |
prefix.major |
prefix.minor |
prefix.build |
prefix.revision |
Attributes
| Type | Description |
|---|---|
| TaskName |
Properties
| Name | Value | Summary |
|---|---|---|
| BuildType | VersionTask |
The algorithm for generating build number. The default is
NAnt.Contrib.Tasks.VersionTask.BuildNumberAlgorithm.MonthDay.
|
| Path | FileInfo |
Path to the file containing the current version number. The default
file is
'build.number' in the project base directory.
|
| Prefix | string |
The string to prefix the properties with. The default is
'buildnumber.'.
|
| RevisionType | VersionTask |
The algorithm for generating revision number. The default is
NAnt.Contrib.Tasks.VersionTask.RevisionNumberAlgorithm.Automatic.
|
| StartDate | DateTime |
Start of project. Date from which to calculate build number.
Required if
NAnt.Contrib.Tasks.VersionTask.BuildNumberAlgorithm.MonthDay is used as
NAnt.Contrib.Tasks.VersionTask.BuildType.
|
Methods
| Name | Value | Summary |
|---|---|---|
| ExecuteTask |
void |
