-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathEnvInstallCommand.php
42 lines (39 loc) · 1.05 KB
/
EnvInstallCommand.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Terminus Plugin that contain a collection of commands useful during
* the build step on a [Pantheon](https://www.pantheon.io) site that uses
* a GitHub PR workflow.
*
* See README.md for usage information.
*/
namespace Pantheon\TerminusBuildTools\Commands;
/**
* Env Install Command
*/
class EnvInstallCommand extends BuildToolsBase
{
/**
* Install the apporpriate CMS on the newly-created Pantheon site.
*
* @command build:env:install
* @aliases build-env:site-install
*/
public function installSite(
$site_env_id,
$siteDir = '',
$site_install_options = [
'account-mail' => '',
'account-name' => '',
'account-pass' => '',
'site-mail' => '',
'site-name' => '',
'profile' => ''
])
{
if (empty($siteDir)) {
$siteDir = getcwd();
}
$composer_json = $this->getComposerJson($siteDir);
return $this->doInstallSite($site_env_id, $composer_json, $site_install_options);
}
}