Skip to content

Commit

Permalink
Adding method to update blt.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdyoung3 committed Jan 24, 2024
1 parent 2918c74 commit 04031fd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blt/src/Blt/Plugin/Commands/GryphonCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private function addDomainsToAcquia($sitename, $type, $sitename_env): void {
if (strtolower($condition) === 'yes') {
$this->say("Running the specific function...");
$this->humsciAddDomain($type, $sitename_env . '.stanford.edu');
$this->addToBltYml();
$this->addToBltYml($sitename);
$this->scaffoldingMultisite();
} else {
$this->say("Skipped running the specific function.");
Expand All @@ -107,7 +107,7 @@ private function scaffoldingMultisite(): void {
* @command gryphon:yaml
* @description This is command to show provision URLs.
*/
public function addToBltYml() {
private function addToBltYml($sitename) {
$bltYAML = __DIR__ . "/../../../../blt.yml";

if (!file_exists($bltYAML)){
Expand All @@ -116,9 +116,9 @@ public function addToBltYml() {
}

$yamlContentsBlt = Yaml::parseFile($bltYAML);

foreach($yamlContentsBlt['multisites'] as $multisite){
echo $multisite;
}
$yamlContentsBlt['multisites'][] = $sitename;
sort($yamlContentsBlt['multisites']);
$newMultisiteYaml = Yaml::dump($yamlContentsBlt, 10, 2);
$this->taskWriteToFile($bltYAML)->text($newMultisiteYaml)->run();
}
}

0 comments on commit 04031fd

Please sign in to comment.