Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

brad-jones/robo-tasks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brads Additional Robo Tasks

Build Status Latest Stable Version Total Downloads License

These are some tasks I have collated from various projects and generalised so I don't have to re invent the wheel for every new project I create.

All tasks are unit tested however there is plenty of room for improvement here so please use with caution.

If you have not come across the PHP Task Runner called Robo, see: http://robo.li/

How to Use:

First up run the following:

composer require brad-jones/robo-tasks

Assuming you already have robo installed, and you have a RoboFile.php.

Method 1: Extend my tasks class like so.

<?php

/*
 * NOTE: I wouldn't normally install robo globally. I use composer to install
 * it for me. However in some cases people still run a global version of robo.
 * Thus we require our local composer autoloader just in case.
 */
require_once(__DIR__.'/vendor/autoload.php');

class RoboFile extends Brads\Robo\Tasks
{
	public function someCommand()
	{
		// now my tasks are available
		$this->taskCreateDb()
			->host('127.0.0.1')
			->user('root')
			->pass('')
			->name('myapp_test')
		->run();
	}
}

Method 2: Import my tasks as needed, like so.

<?php

require_once(__DIR__.'/vendor/autoload.php');

class RoboFile extends Robo\Tasks
{
	// import additional task
	use Brads\Task\CreateDb;

	public function someCommand()
	{
		$this->taskCreateDb()
			->host('127.0.0.1')
			->user('root')
			->pass('')
			->name('myapp_test')
		->run();
	}
}

Developed by Brad Jones - brad@bjc.id.au

About

Extra Tasks for the Robo Task Runner - http://robo.li/

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages