NAnt Help Task Reference <stautolabel> | NAnt.Contrib.Tasks () |
Task for supporting labeling of repositories with incremented version
numbers. The version number calculated will be concatenated to the
label
.
Instruments root of repository with versionnumber.xml
file.
If this file is not present, it is created and checked into StarTeam. The default version number is 1.0.0. By default the build number is incremented. Properties are present to allow setting and incrementing of major, minor, and build versions.
When label is created, properties are set to expose version information and the new label :
Note: Incrementing or setting major or minor versions does NOT reset the build version.
Attribute | Type | Description | Required |
---|---|---|---|
buildversion | int |
Build version number used for label.
If this value is set. incrementbuild is ignored.
|
False |
incrementbuild | bool |
Increment build version number. The default is true.
If buildversion is set, this property is ignored.
|
False |
incrementmajor | bool |
Increment major version number. The default is false.
If majorversion is set, this property is ignored.
|
False |
incrementminor | bool |
Increment minor version number. The default is false.
If minorversion is set, this property is ignored.
|
False |
majorversion | int |
Major version number used for label. If this value is set,
incrementmajor is ignored.
|
False |
minorversion | int |
Minor version number used for label. If this value is set,
incrementminor is ignored.
|
False |
versionfile | string |
Allows user to specify the filename where the version xml is stored.
The default is versionnumber.xml .
|
False |
label | string | The name to be given to the label; required. | True |
buildlabel | bool | Should label be marked build : default is true | False |
description | string | Optional description of the label to be stored in the StarTeam project. | False |
failonerror | bool | False | |
if | bool | False | |
password | string | The password used for login. | False |
projectname | string | The name of the StarTeam project to be acted on | False |
revisionlabel | bool | Should label created be a revision label : default is false | False |
servername | string | Name of StarTeamServer. | False |
serverport | string | Port number of the StarTeam connection. | False |
timestamp | string | Optional: If this property is set the label will be created as of the datetime specified. Please provide a datetime format that can be parsed via Parse. | False |
unless | bool | False | |
url | string | One stop to set all parameters needed to connect to a StarTeam server. | False |
username | string | The StarTeam user name used for login. | False |
verbose | bool | False | |
viewname | string | The name of the StarTeam view to be acted on. | False |
Increment the build version.
<stautolabel url="${ST.url}" />
Set the major version.
<stautolabel majorversion="2" url="${ST.url}" />
Increment the minor version.
<stautolabel incrementminor="true" url="${ST.url}" />
Example versionnumber.xml
file.
<?xml version="1.0"?> <stautolabel> <version major="1" minor="0" build="0" /> </stautolabel>