# tasks/ext/VersionTask.php

VersionTask

Increments a three-part version number from a given file and writes it back to the file. Incrementing is based on given releasetype, which can be one of Major, Minor and Bugfix. Resulting version number is also published under supplied property.

Author
  Mike Wittje
Package
  phing.tasks.ext
Version
  $Id: VersionTask.php 1084 2011-05-06 09:55:25Z mrook $ $Rev $Revision: 1084 $ $Date: 2011-05-06 11:55:25 +0200 (Fri, 06 May 2011) $ $Author: mrook $

## \VersionTask
jump to top

Package: phing\tasks\ext

VersionTask

Increments a three-part version number from a given file and writes it back to the file. Incrementing is based on given releasetype, which can be one of Major, Minor and Bugfix. Resulting version number is also published under supplied property.

Parent(s)
  \Task < \ProjectComponent
Author
  Mike Wittje
Version
  $Id: VersionTask.php 1084 2011-05-06 09:55:25Z mrook $ $Rev $Revision: 1084 $ $Date: 2011-05-06 11:55:25 +0200 (Fri, 06 May 2011) $ $Author: mrook $

### Constants

`RELEASETYPE_MAJOR = 'MAJOR'`

`RELEASETYPE_MINOR = 'MINOR'`

`RELEASETYPE_BUGFIX = 'BUGFIX'`

### Properties

`\PhingFile $file= ''`

Property for File

file
Details

Type
  \PhingFile

`string $property= ''`

Property to be set

Details

Type
  string

`string $releasetype= ''`

Property for Releasetype

Details

Type
  string

### Methods

`checkFile( ) : void`

checks file attribute

Throws

Exception | Description
--- | ---
\BuildException |

`checkProperty( ) : void`

checks property attribute

Throws

Exception | Description
--- | ---
\BuildException |

`checkReleasetype( ) : void`

checks releasetype attribute

Throws

Exception | Description
--- | ---
\BuildException |

`getDescription( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`getVersion( string $filecontent ) : string`

Returns new version number corresponding to Release type

Parameters

Name | Type | Description
--- | --- | ---
$filecontent | string |

Returns

Type | Description
--- | ---
string |

`init( ) : void`

`log( ) : void`

`main( ) : void`

Main-Method for the Task

Throws

Exception | Description
--- | ---
\BuildException |

`maybeConfigure( ) : void`

`perform( ) : void`

`setDescription( ) : void`

`setFile( \PhingFile $file ) : void`

Set Property for File containing versioninformation

Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setProject( ) : void`

`setProperty( $property ) : void`

Set name of property to be set

Parameters

Name | Type | Description
--- | --- | ---
$property |  |

`setReleasetype( string $releasetype ) : void`

Set Property for Releasetype (Minor, Major, Bugfix)

Parameters

Name | Type | Description
--- | --- | ---
$releasetype | string |

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

Documentation was generated by DocBlox 0.17.1.