PHP code example of digipolisgent / robo-drush

1. Go to this page and download the library: Download digipolisgent/robo-drush library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

digipolisgent / robo-drush example snippets


class RoboFile extends \Robo\Tasks
{
    // if you use robo-drush ~2.1 for Robo >=0.5.2, or robo-drush >3 for Robo >=1.0.0-RC1, or robo-drush form Robo >=2.0.0
    use \Boedah\Robo\Task\Drush\loadTasks;

    // if you use ~1.0 for Robo ~0.4
    use \Boedah\Robo\Task\Drush;
    
    //...
}

$this->taskDrushStack()
    ->drupalRootDirectory('/var/www/html/some-site')
    ->uri('sub.example.com')
    ->maintenanceOn()
    ->updateDb()
    ->revertAllFeatures()
    ->maintenanceOff()
    ->run();

$this->taskDrushStack()
  ->siteName('Site Name')
  ->siteMail('[email protected]')
  ->locale('de')
  ->accountMail('[email protected]')
  ->accountName('admin')
  ->accountPass('pw')
  ->dbPrefix('drupal_')
  ->sqliteDbUrl('sites/default/.ht.sqlite')
  ->disableUpdateStatusModule()
  ->siteInstall('minimal')
  ->run();