classes/phing/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

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.

Extends from
\Task
author
Mike Wittje
copyright
2001,2002 THYRELL. All rights reserved
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 $

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

methodprivate  checkFile( ) : void
checks file attribute
Details
throws
methodprivate  checkProperty( ) : void
checks property attribute
Details
throws
methodprivate  checkReleasetype( ) : void
checks releasetype attribute
Details
throws
methodprivate  getVersion( string $filecontent ) : string
Returns new version number corresponding to Release type
Parameters
Name Type Description
$filecontent string
Returns
Type Description
string
methodpublic  main( ) : void
Main-Method for the Task
Details
throws
methodpublic  setFile( \PhingFile $file ) :
Set Property for File containing versioninformation
Parameters
Name Type Description
$file \PhingFile
methodpublic  setProperty(  $property ) : void
Set name of property to be set
Parameters
Name Type Description
$property
methodpublic  setReleasetype( string $releasetype ) :
Set Property for Releasetype (Minor, Major, Bugfix)
Parameters
Name Type Description
$releasetype string
Documentation was generated by DocBlox 0.13.1.