PHP Class RoboFile, Robo

See also: http://robo.li/
Inheritance: extends Robo\Tasks, use trait joomla_projects\robo\loadTasks
Show file Open project: codegyre/robo

Public Methods

Method Description
changed ( string $addition ) Update changelog.
docs ( ) Generate the Robo documentation files.
generateTask ( $className, $wrapperClassName = "" ) Generate a new Robo task that wraps an existing utility class.
pharBuild ( ) Build the Robo phar executable.
pharInstall ( ) Install Robo phar.
pharPublish ( ) Publish Robo phar.
publish ( ) Publish Robo.
release ( $opts = ['beta' => false] ) Release Robo.
sniff ( string $file = 'src/', $options = ['autofix' => false, 'strict' => false] ) Code sniffer.
test ( array $args, $options = ['coverage-html' => false, 'coverage' => false] ) Run the Robo unit tests.
versionBump ( string $version = '', $options = ['stage' => ''] ) Update the version of Robo.

Protected Methods

Method Description
devDependenciesToRemoveFromPhar ( ) : array The phar:build command removes the project requirements from the 'require-dev' section that are not in the 'suggest' section.
incrementVersion ( string $version, string $stage = '' ) : string Advance to the next SemVer version.
writeVersion ( string $version ) Write the specified version string back into the Robo.php file.

Method Details

changed() public method

Add an entry to the Robo CHANGELOG.md file.
public changed ( string $addition )
$addition string The text to add to the change log.

devDependenciesToRemoveFromPhar() protected method

The phar:build command removes the project requirements from the 'require-dev' section that are not in the 'suggest' section.

docs() public method

Generate the Robo documentation files.
public docs ( )

generateTask() public method

Generate a new Robo task that wraps an existing utility class.
public generateTask ( $className, $wrapperClassName = "" )
$className The name of the existing utility class to wrap.
$wrapperClassName The name of the wrapper class to create. Optional.

incrementVersion() protected method

The behavior depends on the parameter $stage. - If $stage is empty, then the patch or minor version of $version is incremented - If $stage matches the current stage in the current version, then add one to the stage (e.g. alpha3 -> alpha4) - If $stage does not match the current stage in the current version, then reset to '1' (e.g. alpha4 -> beta1)
protected incrementVersion ( string $version, string $stage = '' ) : string
$version string A SemVer version
$stage string dev, alpha, beta, rc or an empty string for stable.
return string

pharBuild() public method

Build the Robo phar executable.
public pharBuild ( )

pharInstall() public method

Installs the Robo phar executable in /usr/bin. Uses 'sudo'.
public pharInstall ( )

pharPublish() public method

Commits the phar executable to Robo's GitHub pages site.
public pharPublish ( )

publish() public method

Builds a site in gh-pages branch. Uses mkdocs
public publish ( )

release() public method

Release Robo.
public release ( $opts = ['beta' => false] )

sniff() public method

Run the PHP Codesniffer on a file or directory.
public sniff ( string $file = 'src/', $options = ['autofix' => false, 'strict' => false] )
$file string A file or directory to analyze.

test() public method

Run the Robo unit tests.
public test ( array $args, $options = ['coverage-html' => false, 'coverage' => false] )
$args array

versionBump() public method

Update the version of Robo.
public versionBump ( string $version = '', $options = ['stage' => ''] )
$version string The new verison for Robo. Defaults to the next minor (bugfix) version after the current relelase.

writeVersion() protected method

Write the specified version string back into the Robo.php file.
protected writeVersion ( string $version )
$version string