Skip to content

Commit

Permalink
9.3.30
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish authored Oct 12, 2022
2 parents 9c514d0 + 69441c0 commit 04e635a
Show file tree
Hide file tree
Showing 60 changed files with 12,062 additions and 17,624 deletions.
3 changes: 3 additions & 0 deletions blt/blt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ multisites:
- dlcl
- dsresearch
- duboislab
- duboislab2022
- ealc
- economics
- em1060
Expand Down Expand Up @@ -142,6 +143,7 @@ multisites:
- language
- linguistics
- lowe
- lowe2022
- mathematics
- mcs
- mediterraneanstudies
Expand All @@ -164,6 +166,7 @@ multisites:
- scl
- sgs
- shenlab
- shenlab2022
- sitp
- siw
- sociology
Expand Down
38 changes: 36 additions & 2 deletions blt/src/Blt/Plugin/Commands/HsAcquiaApiCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,41 @@ public function createDatabase() {
$this->say('<info>' . $this->acquiaDatabases->create($this->appId, $database)->message . '</info>');
}

/**
* Add a domains to Acquia environment.
*
* @param string $sitename
* BLT Sitename from multisite array.
*
* @option include-production Include the live production url.
*
* @command humsci:add-site-domains
*/
public function humsciAddDomains(string $sitename, $options = ['include-production' => FALSE]) {
$multisites = $this->getConfigValue('multisites');
if (!in_array($sitename, $multisites)) {
throw new \Exception('Invalidate sitename');
}

$this->connectAcquiaApi();
$site_domain = str_replace('_', '-', str_replace('__', '.', $sitename));
foreach (['dev', 'stage', 'prod'] as $environment) {
$domain = "$site_domain-$environment.stanford.edu";
preg_match('/(.*)\.(.*)/', $site_domain, $matches);
if ($matches) {
[, $first_part, $second_part] = $matches;
$domain = "$first_part-$environment.$second_part.stanford.edu";
}

$environment = $environment == 'stage' ? 'test' : $environment;
$this->say($this->acquiaDomains->create($this->getEnvironmentUuid($environment), $domain)->message);
if ($environment == 'prod' && $options['include-production']) {
$domain = str_replace('-prod.', '.', $domain);
$this->say($this->acquiaDomains->create($this->getEnvironmentUuid($environment), $domain)->message);
}
}
}

/**
* Add a domain to Acquia environment.
*
Expand Down Expand Up @@ -316,8 +351,7 @@ protected function connectAcquiaApi() {
}
try {
$this->acquiaApplications->getAll();
}
catch (\Throwable $e) {
} catch (\Throwable $e) {
$this->traitConnectAcquiaApi();
}
}
Expand Down
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@
"drupal/environment_indicator": "^4.0",
"drupal/extlink": "^1.5",
"drupal/fakeobjects": "^1.1",
"drupal/fast_404": "^2.0@alpha",
"drupal/fast_404_generator": "^1.0",
"drupal/field_formatter_class": "^1.4",
"drupal/field_group": "^3.1",
"drupal/field_permissions": "^1.1",
Expand All @@ -193,6 +195,7 @@
"drupal/layout_paragraphs": "^2.0",
"drupal/markup": "^1.0@beta",
"drupal/masquerade": "^2.0@beta",
"drupal/mass_pwreset": "^2.0@beta",
"drupal/maxlength": "^2.0@RC",
"drupal/memcache": "^2.3",
"drupal/menu_admin_per_menu": "^1.3",
Expand Down Expand Up @@ -292,9 +295,6 @@
"extra": {
"enable-patching": true,
"patches": {
"drupal/acquia_connector": {
"https://www.drupal.org/project/acquia_connector/issues/3308236": "https://git.drupalcode.org/project/acquia_connector/-/merge_requests/16.patch"
},
"drupal/addtocal": {
"https://www.drupal.org/project/addtocal/issues/3197306": "https://www.drupal.org/files/issues/2021-04-09/field-token-values-not-cleared-when-empty-3197306-2.patch",
"https://www.drupal.org/project/addtocal/issues/3200494": "https://www.drupal.org/files/issues/2021-02-26/1551026-smart_date.patch"
Expand Down Expand Up @@ -327,6 +327,9 @@
"drupal/fakeobjects": {
"https://www.drupal.org/project/fakeobjects/issues/3002953": "https://www.drupal.org/files/issues/2020-06-22/fakeobjects-missing_plugin-3002953-5.patch"
},
"drupal/fast_404": {
"https://www.drupal.org/project/fast_404/issues/2838359": "https://www.drupal.org/files/issues/2022-06-16/fast_404-honor_redirects-2838359-50.patch"
},
"drupal/field_group": {
"https://www.drupal.org/project/field_group/issues/2969051": "https://www.drupal.org/files/issues/2022-09-20/2969051-66.patch"
},
Expand Down
Loading

0 comments on commit 04e635a

Please sign in to comment.