public function RoboFile::buildSite in Panopoly 7
Builds a Drupal code base with Panopoly in it at the target path.
Parameters
string $target_path: The path to build the Drupal site.
Return value
\Robo\Collection\CollectionBuilder
Throws
\Exception
File
- ./
RoboFile.php, line 351
Class
- RoboFile
- This is project's console commands configuration for Robo task runner.
Code
public function buildSite($target_path) {
if (file_exists($target_path)) {
throw new \Exception("{$target_path} already exists");
}
/** @var $this|\Robo\Collection\CollectionBuilder $collection */
$collection = $this
->collectionBuilder();
$collection
->addTask($this
->buildDependencies());
$drupal_org_make = __DIR__ . '/drupal-org.make';
$collection
->taskExec("drush make drupal-org-core.make {$target_path} -y");
$collection
->taskMirrorDir([
__DIR__ => "{$target_path}/profiles/panopoly",
]);
return $collection;
}