tasks/ext/VersionTask.php

Show: inherited
Table of Contents

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

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

Constant  RELEASETYPE_MAJOR = 'MAJOR'
Constant  RELEASETYPE_MINOR = 'MINOR'
Constant  RELEASETYPE_BUGFIX = 'BUGFIX'

Properties

Propertyprivate\PhingFile  $file= ''

Property for File

file
Details
Type
\PhingFile
Propertyprivatestring  $property= ''

Property to be set

Details
Type
string
Propertyprivatestring  $releasetype= ''

Property for Releasetype

Details
Type
string

Methods

methodprivatecheckFile( ) : void

checks file attribute

Throws
Exception Description
\BuildException
methodprivatecheckProperty( ) : void

checks property attribute

Throws
Exception Description
\BuildException
methodprivatecheckReleasetype( ) : void

checks releasetype attribute

Throws
Exception Description
\BuildException
methodpublicgetDescription( ) : void

methodpublicgetLocation( ) : void

methodpublicgetOwningTarget( ) : void

methodpublicgetProject( ) : void

methodprotectedgetRegisterSlot( ) : void

methodpublicgetRuntimeConfigurableWrapper( ) : void

methodpublicgetTaskName( ) : void

methodpublicgetTaskType( ) : void

methodprivategetVersion( string $filecontent ) : string

Returns new version number corresponding to Release type

Parameters
Name Type Description
$filecontent string
Returns
Type Description
string
methodpublicinit( ) : void

methodpubliclog( ) : void

methodpublicmain( ) : void

Main-Method for the Task

Throws
Exception Description
\BuildException
methodpublicmaybeConfigure( ) : void

methodpublicperform( ) : void

methodpublicsetDescription( ) : void

methodpublicsetFile( \PhingFile $file ) : void

Set Property for File containing versioninformation

Parameters
Name Type Description
$file \PhingFile
methodpublicsetLocation( ) : void

methodpublicsetOwningTarget( ) : void

methodpublicsetProject( ) : void

methodpublicsetProperty(  $property ) : void

Set name of property to be set

Parameters
Name Type Description
$property
methodpublicsetReleasetype( string $releasetype ) : void

Set Property for Releasetype (Minor, Major, Bugfix)

Parameters
Name Type Description
$releasetype string
methodpublicsetRuntimeConfigurableWrapper( ) : void

methodpublicsetTaskName( ) : void

methodpublicsetTaskType( ) : void

Documentation was generated by DocBlox 0.17.1.