Platformsh\Cli\Local\Toolstack\Drupal::build PHP Method

build() public method

public build ( )
    public function build()
    {
        $profiles = glob($this->appRoot . '/*.profile');
        $projectMake = $this->findDrushMakeFile();
        if (count($profiles) > 1) {
            throw new \Exception("Found multiple files ending in '*.profile' in the directory.");
        } elseif (count($profiles) == 1) {
            $profileName = strtok(basename($profiles[0]), '.');
            $this->buildInProfileMode($profileName);
        } elseif ($projectMake) {
            $this->buildInProjectMode($projectMake);
        } else {
            $this->output->writeln("Building in vanilla mode: you are missing out!");
            $this->copyToBuildDir();
            if (!$this->copy) {
                $this->copyGitIgnore('drupal/gitignore-vanilla');
                $this->checkIgnored('sites/default/settings.local.php');
                $this->checkIgnored('sites/default/files');
            }
        }
        $this->processSpecialDestinations();
    }