Skip to content

Commit

Permalink
Updated script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdyoung3 committed Apr 29, 2024
1 parent a49c3e9 commit 915847e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions blt/src/Blt/Plugin/Commands/GryphonCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function enableModules($environment, $modules) {
}

/**
<<<<<<< HEAD
* Generate a list of emails for the given role on all sites.
*
* @command sdss:role-report
Expand Down Expand Up @@ -99,19 +98,19 @@ public function provision($sitename): void {
// Define environment types
$env_types = ['dev', 'test', 'prod'];

foreach ($env_types as $type) {
$sitename_env = $sitename . '-' . $type;
foreach ($env_types as $env_type) {
$sitename_env = $sitename . '-' . $env_type;

// Checks to see if domain name is in use.
if ($this->checkForARecord($sitename_env)) {
$this->say('A Record present in NetDB. Cannot proceed with provision until aliases released.');
} else {
//Outputs alias for NetDB.
$this->say('A Record not present. Site name is free to use.');
$this->say('Alias for NetDB: ' . $sitename_env);
$this->addDomainsToAcquia($sitename, $type, $sitename_env);
$this->postMultiSiteInit($sitename);
}
//Outputs alias for NetDB.
$this->say('A Record not present. Site name is free to use.');
$this->say('Alias for NetDB: ' . $sitename_env);
$this->addDomainsToAcquia($sitename, $env_type, $sitename_env);
// $this->postMultiSiteInit($sitename);

}
}

Expand All @@ -131,12 +130,12 @@ private function checkForARecord($domain): bool {
*
* @return void
*/
private function addDomainsToAcquia($sitename, $type, $sitename_env): void {
private function addDomainsToAcquia($sitename, $env_type, $sitename_env): void {
$condition = $this->ask("Do you want to add the domain to acquia? (yes/no)", "yes");

if (strtolower($condition) === 'yes') {
$this->say("Running the specific function...");
$this->humsciAddDomain($type, $sitename_env . '.stanford.edu');
$this->gryphonAddDomain($env_type, $sitename_env . '.stanford.edu');
$this->addToBltYml($sitename);
$this->scaffoldingMultisite();
} else {
Expand Down

0 comments on commit 915847e

Please sign in to comment.