function DrushMakeProject::make

8.0.x make.project.inc DrushMakeProject::make()
6.x make.project.inc DrushMakeProject::make()
7.x make.project.inc DrushMakeProject::make()
5.x make.project.inc DrushMakeProject::make()
master make.project.inc DrushMakeProject::make()

Build a project.

File

commands/make/make.project.inc, line 163
Drush Make processing classes.

Class

DrushMakeProject
The base project class.

Code

function make() {
  if ($this->made) {
    drush_log(dt('Attempt to build project @project more then once prevented.', array('@project' => $this->name)));
    return TRUE;
  }
  $this->made = TRUE;

  if (!isset($this->download_location)) {
    $this->download_location = $this->findDownloadLocation();
  }
  if ($this->download() === FALSE) {
    return FALSE;
  }
  if (!$this->addLockfile($this->download_location)) {
    return FALSE;
  }
  if (!$this->applyPatches($this->download_location)) {
    return FALSE;
  }
  if (!$this->getTranslations($this->download_location)) {
    return FALSE;
  }
  // Handle .info file re-writing (if so desired).
  if (!drush_get_option('no-gitinfofile', FALSE) && isset($this->download['type']) && $this->download['type'] == 'git') {
    $this->processGitInfoFiles();
  }
  // Clean-up .git directories.
  if (!_get_working_copy_option($this->download)) {
    $this->removeGitDirectory();
  }
  if (!$this->recurse($this->download_location)) {
    return FALSE;
  }
  return TRUE;
}