Skip to content

Commit 34bfb23

Browse files
authored
Merge pull request #110 from universityofadelaide/config-install
Adds config install command for one off config install.
2 parents 176d760 + 01ae460 commit 34bfb23

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scaffold/required/RoboFileBase.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ abstract class RoboFileBase extends Tasks {
5555
* The path to the Drupal config directories.
5656
*/
5757
protected const CONFIG_DIRECTORY = '/code/config-export';
58+
protected const CONFIG_INSTALL_DIRECTORY = '/code/config-install';
5859
protected const CONFIG_DIRECTORY_NEW = 'config_new';
5960
protected const CONFIG_DIRECTORY_OLD = 'config_old';
6061

@@ -130,6 +131,7 @@ public function build(): void {
130131
$this->ensureDirectories();
131132
$this->buildInstall();
132133
$this->configImport();
134+
$this->configInstall();
133135
$this->devCacheRebuild();
134136
$this->ensureDirectories();
135137
$this->devXdebugEnable();
@@ -320,6 +322,19 @@ public function devXdebugDisable() {
320322
}
321323
}
322324

325+
/**
326+
* Imports Drupal configuration for one off configuration.
327+
*/
328+
public function configInstall() {
329+
$successful = $this->_exec(
330+
sprintf('%s config:import --partial --yes --source=%s',
331+
$this->drush_cmd,
332+
static::CONFIG_INSTALL_DIRECTORY
333+
))
334+
->wasSuccessful();
335+
$this->checkFail($successful, 'Config install import failed.');
336+
}
337+
323338
/**
324339
* Imports Drupal configuration.
325340
*/

0 commit comments

Comments
 (0)