From 2b1dfc294e86657c96276147822627214b86b6fa Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 13:37:40 +1000 Subject: [PATCH 01/15] Excluded test config. --- scripts/theme_excluded_configs.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/theme_excluded_configs.txt b/scripts/theme_excluded_configs.txt index bf6d980ae..e5f7d263b 100644 --- a/scripts/theme_excluded_configs.txt +++ b/scripts/theme_excluded_configs.txt @@ -148,3 +148,5 @@ webform.settings webform.webform.contact webform.webform_options* workflows.workflow.editorial +block.block.exposedformcivictheme_testpage_civictheme +views.view.civictheme_test From 7184de94a81b12519a63075d5df0e38a49bb1e7c Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 13:39:09 +1000 Subject: [PATCH 02/15] Updated missed config. --- .../core.entity_form_display.node.civictheme_page.default.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docroot/themes/contrib/civictheme/config/install/core.entity_form_display.node.civictheme_page.default.yml b/docroot/themes/contrib/civictheme/config/install/core.entity_form_display.node.civictheme_page.default.yml index 38c1b41f6..8c50ef6f4 100644 --- a/docroot/themes/contrib/civictheme/config/install/core.entity_form_display.node.civictheme_page.default.yml +++ b/docroot/themes/contrib/civictheme/config/install/core.entity_form_display.node.civictheme_page.default.yml @@ -20,6 +20,7 @@ dependencies: - field.field.node.civictheme_page.field_c_n_topics - node.type.civictheme_page module: + - content_moderation - field_group - media_library - paragraphs From 1b976bb046975188f55cab65bdeac21f9c9a1521 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 21:04:57 +1000 Subject: [PATCH 03/15] Added config filter for permissions. --- .../custom/cs_core/cs_core.services.yml | 6 + .../CsCoreConfigDevelSubscriber.php | 82 +++++++++++ .../ConfigFilter/CsCoreIgnoreFilter.php | 120 +++++++++++++++++ .../civictheme/civictheme.provision.inc | 127 ++++++++++++++++++ 4 files changed, 335 insertions(+) create mode 100644 docroot/modules/custom/cs_core/cs_core.services.yml create mode 100644 docroot/modules/custom/cs_core/src/EventSubscriber/CsCoreConfigDevelSubscriber.php create mode 100644 docroot/modules/custom/cs_core/src/Plugin/ConfigFilter/CsCoreIgnoreFilter.php diff --git a/docroot/modules/custom/cs_core/cs_core.services.yml b/docroot/modules/custom/cs_core/cs_core.services.yml new file mode 100644 index 000000000..23be9cd93 --- /dev/null +++ b/docroot/modules/custom/cs_core/cs_core.services.yml @@ -0,0 +1,6 @@ +services: + cs_core.config_devel_subscriber: + class: Drupal\cs_core\EventSubscriber\CsCoreConfigDevelSubscriber + arguments: ['@config.factory', '@config.manager', '@plugin.manager.config_filter'] + tags: + - { name: event_subscriber } diff --git a/docroot/modules/custom/cs_core/src/EventSubscriber/CsCoreConfigDevelSubscriber.php b/docroot/modules/custom/cs_core/src/EventSubscriber/CsCoreConfigDevelSubscriber.php new file mode 100644 index 000000000..f7a98371f --- /dev/null +++ b/docroot/modules/custom/cs_core/src/EventSubscriber/CsCoreConfigDevelSubscriber.php @@ -0,0 +1,82 @@ +configFactory = $config_factory; + $this->configManager = $config_manager; + $this->configFilterPluginManager = $config_filter_plugin_manager; + } + + /** + * React to configuration ConfigEvent::SAVE events. + * + * @param \Drupal\config_devel\Event\ConfigDevelSaveEvent $event + * The event to process. + */ + public function onConfigDevelSave(ConfigDevelSaveEvent $event) { + $filenames = $event->getFileNames(); + + if (empty($filenames)) { + return; + } + + $filename = reset($filenames); + $name = basename($filename, '.yml'); + $data = $event->getData(); + + /** @var \Drupal\cs_core\Plugin\ConfigFilter\CsCoreIgnoreFilter $plugin */ + $plugin = $this->configFilterPluginManager->createInstance('cs_core_config_ignore'); + + $data = $plugin->filterWrite($name, $data); + + $event->setData($data); + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() { + $events[ConfigDevelEvents::SAVE][] = ['onConfigDevelSave', 10]; + + return $events; + } + +} diff --git a/docroot/modules/custom/cs_core/src/Plugin/ConfigFilter/CsCoreIgnoreFilter.php b/docroot/modules/custom/cs_core/src/Plugin/ConfigFilter/CsCoreIgnoreFilter.php new file mode 100644 index 000000000..9f59eaa32 --- /dev/null +++ b/docroot/modules/custom/cs_core/src/Plugin/ConfigFilter/CsCoreIgnoreFilter.php @@ -0,0 +1,120 @@ +getExcludedRolePermissions($role_name); + if (isset($data['permissions'])) { + $data['permissions'] = array_values(array_diff($data['permissions'], $permissions)); + } + + $modules = $this->getExcludedRoleDependencyModules($role_name); + if (isset($data['dependencies']['module'])) { + foreach ($data['dependencies']['module'] as $key => $module_name) { + if (in_array($module_name, $modules)) { + unset($data['dependencies']['module'][$key]); + } + } + $data['dependencies']['module'] = array_values($data['dependencies']['module']); + } + } + + return $data; + } + + /** + * Get excluded permissions for a role. + * + * @param string $role_name + * Role machine name. + * + * @return array + * Array of excluded permissions. + */ + protected function getExcludedRolePermissions($role_name) { + $permissions = []; + + $map = $this->getRolePermissionsMap(); + + if (!empty($map[$role_name])) { + foreach ($map[$role_name] as $module_permissions) { + $permissions = array_merge($permissions, $module_permissions); + } + } + + array_filter($permissions); + + return $permissions; + } + + /** + * Get excluded dependency modules for a role. + * + * @param string $role_name + * Role machine name. + * + * @return array + * Array of excluded dependency modules. + */ + protected function getExcludedRoleDependencyModules($role_name) { + $modules = []; + + $map = $this->getRolePermissionsMap(); + + if (!empty($map[$role_name])) { + $modules = array_keys($map[$role_name]); + } + + array_filter($modules); + + return $modules; + } + + /** + * Get pre-defined role-permissions map from the provisioning file. + * + * This allows to centrally manage additional permissions that may be + * optionally provisioned for specific roles. + */ + protected function getRolePermissionsMap() { + $civictheme_path = \Drupal::service('extension.list.theme')->getPath('civictheme'); + $provision_file = $civictheme_path . DIRECTORY_SEPARATOR . 'civictheme.provision.inc'; + if (!file_exists($provision_file)) { + return []; + } + + require_once $provision_file; + + return civictheme_provision_permissions_map(); + } + +} diff --git a/docroot/themes/contrib/civictheme/civictheme.provision.inc b/docroot/themes/contrib/civictheme/civictheme.provision.inc index a7571fd09..55fef774c 100644 --- a/docroot/themes/contrib/civictheme/civictheme.provision.inc +++ b/docroot/themes/contrib/civictheme/civictheme.provision.inc @@ -20,6 +20,7 @@ use Drupal\Core\Url; use Drupal\media\Entity\Media; use Drupal\menu_link_content\Entity\MenuLinkContent; use Drupal\paragraphs\Entity\Paragraph; +use Drupal\user\Entity\Role; use Drush\Drush; use Drush\Log\LogLevel; @@ -795,6 +796,132 @@ function civictheme_provision__update_theme_settings() { $config->save(); } +/** + * Provision permissions. + */ +function civictheme_provision__permissions() { + $map = civictheme_provision_permissions_map(); + + /** @var \Drupal\user\PermissionHandler $permission_handler */ + $permission_handler = \Drupal::getContainer()->get('user.permissions'); + $all_permissions = array_keys($permission_handler->getPermissions()); + + foreach ($map as $role_name => $permissions_map) { + $role = Role::load($role_name); + if (!$role) { + continue; + } + + foreach ($permissions_map as $permissions) { + foreach ($permissions as $permission) { + // Only grant permissions that are currently available on the site. + if (in_array($permission, $all_permissions)) { + $role->grantPermission($permission); + } + } + } + $role->save(); + } +} + +/** + * Map of roles and permissions to be granted. + * + * This allows to centrally manage additional permissions that may be + * optionally provisioned for specific CivicTheme roles. Such permissions + * would not be a part of CivicTheme roles' configurations, but would be + * expected the roles to have in some Drupal profiles (like GovCMS). + * + * @return array + * Array of with role names as keys and permissions arrays as values, each of + * which is keyed by a module. + */ +function civictheme_provision_permissions_map() { + $map = [ + 'civictheme_content_approver' => [ + 'honeypot' => [ + 'bypass honeypot protection', + ], + 'tfa' => [ + 'setup own tfa', + ], + 'toolbar' => [ + 'access toolbar', + ], + ], + 'civictheme_content_author' => [ + 'honeypot' => [ + 'bypass honeypot protection', + ], + 'tfa' => [ + 'setup own tfa', + ], + 'toolbar' => [ + 'access toolbar', + ], + ], + 'civictheme_site_administrator' => [ + 'honeypot' => [ + 'bypass honeypot protection', + ], + 'tfa' => [ + 'setup own tfa', + ], + 'toolbar' => [ + 'access toolbar', + ], + 'password_policy' => [ + 'manage password reset', + ], + 'pathauto' => [ + 'notify of path changes', + ], + 'webform' => [ + 'access webform help', + 'access webform overview', + 'access webform submission log', + 'access webform submission user', + 'administer webform element access', + 'administer webform submission', + 'administer webform', + 'create webform content', + 'create webform', + 'delete any webform content', + 'delete any webform submission', + 'delete any webform', + 'delete own webform content', + 'delete own webform submission', + 'delete own webform', + 'delete webform revisions', + 'delete webform submissions any node', + 'delete webform submissions own node', + 'edit any webform content', + 'edit any webform submission', + 'edit any webform', + 'edit own webform content', + 'edit own webform submission', + 'edit own webform', + 'edit webform assets', + 'edit webform source', + 'edit webform submissions any node', + 'edit webform submissions any node', + 'edit webform submissions any node', + 'edit webform submissions own node', + 'edit webform twig', + 'edit webform variants', + 'revert webform revisions', + 'view any webform submission', + 'view own webform submission', + 'view webform revisions', + 'view webform submissions any node', + 'view webform submissions own node', + ], + ], + ]; + + return $map; +} + /** * @} */ From afc309deb86c543d531c205976c672064013c0cc Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 22:00:51 +1000 Subject: [PATCH 04/15] Updated role permissions. --- .../civictheme/civictheme.provision.inc | 21 ------------------- .../user.role.civictheme_content_approver.yml | 6 ------ .../user.role.civictheme_content_author.yml | 7 ------- ...ser.role.civictheme_site_administrator.yml | 7 +------ 4 files changed, 1 insertion(+), 40 deletions(-) diff --git a/docroot/themes/contrib/civictheme/civictheme.provision.inc b/docroot/themes/contrib/civictheme/civictheme.provision.inc index 55fef774c..3203a6bc1 100644 --- a/docroot/themes/contrib/civictheme/civictheme.provision.inc +++ b/docroot/themes/contrib/civictheme/civictheme.provision.inc @@ -877,41 +877,20 @@ function civictheme_provision_permissions_map() { 'notify of path changes', ], 'webform' => [ - 'access webform help', - 'access webform overview', 'access webform submission log', - 'access webform submission user', - 'administer webform element access', - 'administer webform submission', - 'administer webform', 'create webform content', - 'create webform', 'delete any webform content', - 'delete any webform submission', - 'delete any webform', 'delete own webform content', - 'delete own webform submission', - 'delete own webform', 'delete webform revisions', 'delete webform submissions any node', 'delete webform submissions own node', 'edit any webform content', - 'edit any webform submission', - 'edit any webform', 'edit own webform content', - 'edit own webform submission', - 'edit own webform', - 'edit webform assets', - 'edit webform source', 'edit webform submissions any node', 'edit webform submissions any node', 'edit webform submissions any node', 'edit webform submissions own node', - 'edit webform twig', - 'edit webform variants', 'revert webform revisions', - 'view any webform submission', - 'view own webform submission', 'view webform revisions', 'view webform submissions any node', 'view webform submissions own node', diff --git a/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_content_approver.yml b/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_content_approver.yml index 565aa8b3a..a9ad1da4a 100644 --- a/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_content_approver.yml +++ b/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_content_approver.yml @@ -10,12 +10,9 @@ dependencies: - contextual - file - filter - - honeypot - media - node - system - - tfa - - toolbar id: civictheme_content_approver label: 'Content Approver' weight: -7 @@ -25,9 +22,6 @@ permissions: - 'access contextual links' - 'access files overview' - 'access media overview' - - 'access toolbar' - - 'bypass honeypot protection' - - 'setup own tfa' - 'use editorial transition archive' - 'use editorial transition archived_draft' - 'use editorial transition archived_published' diff --git a/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_content_author.yml b/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_content_author.yml index b32429e34..9da7614a0 100644 --- a/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_content_author.yml +++ b/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_content_author.yml @@ -19,14 +19,11 @@ dependencies: - contextual - file - filter - - honeypot - media - node - path - shortcut - system - - tfa - - toolbar id: civictheme_content_author label: 'Content Author' weight: -8 @@ -38,10 +35,7 @@ permissions: - 'access in-place editing' - 'access media overview' - 'access shortcuts' - - 'access toolbar' - - 'administer media' - 'administer url aliases' - - 'bypass honeypot protection' - 'create civictheme_alert content' - 'create civictheme_audio media' - 'create civictheme_document media' @@ -99,7 +93,6 @@ permissions: - 'revert civictheme_alert revisions' - 'revert civictheme_event revisions' - 'revert civictheme_page revisions' - - 'setup own tfa' - 'update any media' - 'update media' - 'use editorial transition create_new_draft' diff --git a/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_site_administrator.yml b/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_site_administrator.yml index 4eb5943ec..edb261d6d 100644 --- a/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_site_administrator.yml +++ b/docroot/themes/contrib/civictheme/config/install/user.role.civictheme_site_administrator.yml @@ -21,15 +21,12 @@ dependencies: - contextual - file - filter - - honeypot - media - node - path - shortcut - system - taxonomy - - tfa - - toolbar - webform id: civictheme_site_administrator label: 'Site Administrator' @@ -48,7 +45,6 @@ permissions: - 'access site in maintenance mode' - 'access site reports' - 'access taxonomy overview' - - 'access toolbar' - 'access user profiles' - 'access webform help' - 'access webform overview' @@ -69,7 +65,6 @@ permissions: - 'administer webform' - 'administer webform element access' - 'administer webform submission' - - 'bypass honeypot protection' - 'bypass node access' - 'create civictheme_alert content' - 'create civictheme_audio media' @@ -146,7 +141,7 @@ permissions: - 'revert civictheme_alert revisions' - 'revert civictheme_event revisions' - 'revert civictheme_page revisions' - - 'setup own tfa' + - 'select account cancellation method' - 'switch shortcut sets' - 'update any media' - 'update media' From 4d03811a814f9fe10bab883123810e76ca1e4d0e Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 22:10:29 +1000 Subject: [PATCH 05/15] Improved enabling of modules required by the CivicTheme. --- .../contrib/civictheme/civictheme.info.yml | 1 + .../civictheme/civictheme.provision.inc | 19 +++++++++++++++++++ .../drupal-install-site-1-enable-modules.sh | 9 ++------- ...drupal-install-site-3-provision-content.sh | 5 +++++ 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/docroot/themes/contrib/civictheme/civictheme.info.yml b/docroot/themes/contrib/civictheme/civictheme.info.yml index 25280fba4..17e42c8cd 100644 --- a/docroot/themes/contrib/civictheme/civictheme.info.yml +++ b/docroot/themes/contrib/civictheme/civictheme.info.yml @@ -13,6 +13,7 @@ dependencies: - drupal:inline_form_errors - drupal:layout_builder - drupal:layout_discovery + - drupal:media - drupal:rest - field_group:field_group - layout_builder_restrictions:layout_builder_restrictions diff --git a/docroot/themes/contrib/civictheme/civictheme.provision.inc b/docroot/themes/contrib/civictheme/civictheme.provision.inc index 3203a6bc1..6f37d2940 100644 --- a/docroot/themes/contrib/civictheme/civictheme.provision.inc +++ b/docroot/themes/contrib/civictheme/civictheme.provision.inc @@ -904,3 +904,22 @@ function civictheme_provision_permissions_map() { /** * @} */ + +/** + * Helper to install modules required by CivicTheme. + * + * @see https://www.drupal.org/node/2652542 + */ +function civictheme_enable_modules() { + /** @var \Drupal\Core\Extension\ThemeHandler $theme_handler */ + $theme_handler = \Drupal::getContainer()->get('theme_handler'); + $theme_data = $theme_handler->rebuildThemeData(); + + if (!empty($theme_data['civictheme'])) { + $modules = array_keys($theme_data['civictheme']->module_dependencies); + /** @var \Drupal\Core\Extension\ModuleInstaller $module_installer */ + $module_installer = \Drupal::getContainer()->get('module_installer'); + $module_installer->install($modules); + } + +} diff --git a/scripts/custom/drupal-install-site-1-enable-modules.sh b/scripts/custom/drupal-install-site-1-enable-modules.sh index 647ffcb04..f1b9612b6 100755 --- a/scripts/custom/drupal-install-site-1-enable-modules.sh +++ b/scripts/custom/drupal-install-site-1-enable-modules.sh @@ -21,8 +21,8 @@ drush="$(if [ -f "${APP}/vendor/bin/drush" ]; then echo "${APP}/vendor/bin/drush echo "==> Removing all files." rm -Rf "${APP}"/docroot/sites/default/files/* > /dev/null || true -echo " > Enable required modules." -$drush ${DRUSH_ALIAS} -y pm-enable components, field_group, menu_block, inline_form_errors, layout_builder_restrictions, paragraphs, rest, block_content, webform +echo " > Enable modules required by CivicTheme." +$drush ${DRUSH_ALIAS} ev "require_once dirname(\Drupal::getContainer()->get('theme_handler')->rebuildThemeData()['civictheme']->getPathname()) . '/civictheme.provision.inc'; civictheme_enable_modules();" echo " > Enable admin theme and set as default." $drush ${DRUSH_ALIAS} -y then adminimal_theme @@ -41,8 +41,3 @@ $drush ${DRUSH_ALIAS} -y thun bartik echo " > Remove GovCMS configs." $drush ${DRUSH_ALIAS} -y pm-enable civictheme_govcms $drush ${DRUSH_ALIAS} civictheme_govcms:remove-config - -if $drush ${DRUSH_ALIAS} ev "print \Drupal\core\Site\Settings::get('environment');" | grep -q -e local; then - echo "==> Enable modules in non-production environment." - $drush ${DRUSH_ALIAS} -y pm-enable config_devel -fi diff --git a/scripts/custom/drupal-install-site-3-provision-content.sh b/scripts/custom/drupal-install-site-3-provision-content.sh index 8a302ab39..d52498bd7 100755 --- a/scripts/custom/drupal-install-site-3-provision-content.sh +++ b/scripts/custom/drupal-install-site-3-provision-content.sh @@ -32,3 +32,8 @@ GENERATED_CONTENT_CREATE=1 $drush ${DRUSH_ALIAS} -y pm-enable cs_generated_conte echo " > Generate sitemap." $drush ${DRUSH_ALIAS} simple-sitemap:generate + +if $drush ${DRUSH_ALIAS} ev "print \Drupal\core\Site\Settings::get('environment');" | grep -q -e local; then + echo "==> Enable modules in non-production environment." + $drush ${DRUSH_ALIAS} -y pm-enable config_devel +fi From bbf495cd0306cc7429d2aaaba470a1306d818439 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 22:58:55 +1000 Subject: [PATCH 06/15] Fixed ignore filter excluding used modules. --- .../ConfigFilter/CsCoreIgnoreFilter.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docroot/modules/custom/cs_core/src/Plugin/ConfigFilter/CsCoreIgnoreFilter.php b/docroot/modules/custom/cs_core/src/Plugin/ConfigFilter/CsCoreIgnoreFilter.php index 9f59eaa32..b15ec01d2 100644 --- a/docroot/modules/custom/cs_core/src/Plugin/ConfigFilter/CsCoreIgnoreFilter.php +++ b/docroot/modules/custom/cs_core/src/Plugin/ConfigFilter/CsCoreIgnoreFilter.php @@ -32,12 +32,17 @@ public function filterWrite($name, array $data) { if (fnmatch('user.role.*', $name)) { $role_name = substr($name, strlen('user.role.')); + // Exclude permissions. $permissions = $this->getExcludedRolePermissions($role_name); if (isset($data['permissions'])) { $data['permissions'] = array_values(array_diff($data['permissions'], $permissions)); } + // Exclude modules, but only if permissions that are not ignored do not + // depend on them. $modules = $this->getExcludedRoleDependencyModules($role_name); + $used_modules = $this->getPermissionsProviders($data['permissions']); + $modules = array_diff($modules, $used_modules); if (isset($data['dependencies']['module'])) { foreach ($data['dependencies']['module'] as $key => $module_name) { if (in_array($module_name, $modules)) { @@ -99,6 +104,31 @@ protected function getExcludedRoleDependencyModules($role_name) { return $modules; } + /** + * Get a list of providers for permissions. + * + * @param array $permissions + * Array of permissions. + * + * @return array + * Array of providers. + */ + protected function getPermissionsProviders(array $permissions) { + $modules = []; + + $permissions_data = \Drupal::service('user.permissions')->getPermissions(); + + foreach ($permissions as $permission) { + if (!empty($permissions_data[$permission])) { + $modules[] = $permissions_data[$permission]['provider']; + } + } + + $modules = array_unique($modules); + + return $modules; + } + /** * Get pre-defined role-permissions map from the provisioning file. * From ac360bd3cd5f4fcaf8e6876f82aa3e32ff542d7d Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 23:32:00 +1000 Subject: [PATCH 07/15] Fixed how dev modules are enabled. --- docroot/modules/custom/cs_core/cs_core.info.yml | 1 + scripts/custom/drupal-install-site-1-enable-modules.sh | 6 +++--- scripts/custom/drupal-install-site-3-provision-content.sh | 5 ----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/docroot/modules/custom/cs_core/cs_core.info.yml b/docroot/modules/custom/cs_core/cs_core.info.yml index b3f158cb9..8c33df000 100644 --- a/docroot/modules/custom/cs_core/cs_core.info.yml +++ b/docroot/modules/custom/cs_core/cs_core.info.yml @@ -9,6 +9,7 @@ dependencies: - admin_toolbar:admin_toolbar_tools - adminimal_admin_toolbar:adminimal_admin_toolbar - coffee:coffee + - config_devel:config_devel - config_update:config_update - environment_indicator:environment_indicator - permissions_filter:permissions_filter diff --git a/scripts/custom/drupal-install-site-1-enable-modules.sh b/scripts/custom/drupal-install-site-1-enable-modules.sh index f1b9612b6..8f01a3ddb 100755 --- a/scripts/custom/drupal-install-site-1-enable-modules.sh +++ b/scripts/custom/drupal-install-site-1-enable-modules.sh @@ -34,9 +34,9 @@ $drush ${DRUSH_ALIAS} -y config-set system.theme default civictheme $drush ${DRUSH_ALIAS} -y config-set media.settings standalone_url true echo " > Uninstall obsolete themes." -$drush ${DRUSH_ALIAS} -y thun claro -$drush ${DRUSH_ALIAS} -y thun govcms_bartik -$drush ${DRUSH_ALIAS} -y thun bartik +$drush ${DRUSH_ALIAS} -y thun claro || true +$drush ${DRUSH_ALIAS} -y thun govcms_bartik || true +$drush ${DRUSH_ALIAS} -y thun bartik || true echo " > Remove GovCMS configs." $drush ${DRUSH_ALIAS} -y pm-enable civictheme_govcms diff --git a/scripts/custom/drupal-install-site-3-provision-content.sh b/scripts/custom/drupal-install-site-3-provision-content.sh index d52498bd7..8a302ab39 100755 --- a/scripts/custom/drupal-install-site-3-provision-content.sh +++ b/scripts/custom/drupal-install-site-3-provision-content.sh @@ -32,8 +32,3 @@ GENERATED_CONTENT_CREATE=1 $drush ${DRUSH_ALIAS} -y pm-enable cs_generated_conte echo " > Generate sitemap." $drush ${DRUSH_ALIAS} simple-sitemap:generate - -if $drush ${DRUSH_ALIAS} ev "print \Drupal\core\Site\Settings::get('environment');" | grep -q -e local; then - echo "==> Enable modules in non-production environment." - $drush ${DRUSH_ALIAS} -y pm-enable config_devel -fi From 716a21e6f3f15725222ade09fd2178f03f2d019f Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 23:34:14 +1000 Subject: [PATCH 08/15] Fixed theme settings provisioning. --- .../civictheme/civictheme.provision.inc | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/docroot/themes/contrib/civictheme/civictheme.provision.inc b/docroot/themes/contrib/civictheme/civictheme.provision.inc index 6f37d2940..6463f1ff7 100644 --- a/docroot/themes/contrib/civictheme/civictheme.provision.inc +++ b/docroot/themes/contrib/civictheme/civictheme.provision.inc @@ -759,34 +759,37 @@ function _civictheme_provision__blocks__copyright() { } /** - * Provision civictheme_demo theme settings. + * Provision theme settings. */ -function civictheme_provision__update_theme_settings() { - $logo_header_desktop = '/themes/custom/civictheme_demo/dist/assets/logos/civictheme_demo_logo_desktop_light.png'; - $logo_header_mobile = '/themes/custom/civictheme_demo/dist/assets/logos/civictheme_demo_logo_mobile_light.png'; - $logo_footer_desktop = '/themes/custom/civictheme_demo/dist/assets/logos/civictheme_demo_logo_desktop_dark.png'; - $logo_footer_mobile = '/themes/custom/civictheme_demo/dist/assets/logos/civictheme_demo_logo_mobile_dark.png'; +function civictheme_provision__theme_settings() { + $theme_name = \Drupal::config('system.theme')->get('default'); + $theme_path = \Drupal::service('extension.list.theme')->getPath($theme_name); + + $logo_header_desktop = "$theme_path/dist/assets/logos/{$theme_name}_logo_desktop_light.png"; + $logo_header_mobile = "$theme_path/dist/assets/logos/{$theme_name}_logo_mobile_light.png"; + $logo_footer_desktop = "$theme_path/dist/assets/logos/{$theme_name}_logo_desktop_dark.png"; + $logo_footer_mobile = "$theme_path/dist/assets/logos/{$theme_name}_logo_mobile_dark.png"; - $favicon = '/themes/custom/civictheme_demo/dist/assets/favicon.ico'; + $favicon = "$theme_path/dist/assets/favicon.ico"; - $config = \Drupal::service('config.factory')->getEditable('civictheme_demo.settings'); + $config = \Drupal::service('config.factory')->getEditable("$theme_name.settings"); $config->set('logo', [ 'use_default' => FALSE, - 'path' => substr($logo_header_desktop, 1), - 'url' => $logo_header_desktop, + 'path' => $logo_header_desktop, + 'url' => '/' . ltrim($logo_header_desktop, '/'), ]); - $config->set('logo_path', substr($logo_header_desktop, 1)); - $config->set('civictheme_header_logo_mobile', substr($logo_header_mobile, 1)); - $config->set('civictheme_footer_logo_desktop', substr($logo_footer_desktop, 1)); - $config->set('civictheme_footer_logo_mobile', substr($logo_footer_mobile, 1)); + $config->set('logo_path', $logo_header_desktop); + $config->set('civictheme_header_logo_mobile', $logo_header_mobile); + $config->set('civictheme_footer_logo_desktop', $logo_footer_desktop); + $config->set('civictheme_footer_logo_mobile', $logo_footer_mobile); $config->set('civictheme_site_logo_alt', 'CivicTheme demo logo'); $config->set('favicon', [ 'use_default' => FALSE, - 'path' => substr($favicon, 1), + 'path' => $favicon, 'mimetype' => 'image/vnd.microsoft.icon', ]); From d37bc8d8d5b729bfc0a76ccce1aaab7767fc15d2 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 6 Jul 2022 23:37:41 +1000 Subject: [PATCH 09/15] Added missing dependencies to theme. --- docroot/themes/contrib/civictheme/civictheme.info.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docroot/themes/contrib/civictheme/civictheme.info.yml b/docroot/themes/contrib/civictheme/civictheme.info.yml index 17e42c8cd..84f7da0f6 100644 --- a/docroot/themes/contrib/civictheme/civictheme.info.yml +++ b/docroot/themes/contrib/civictheme/civictheme.info.yml @@ -9,16 +9,20 @@ libraries: dependencies: - components:components + - content_moderation:content_moderation - drupal:block_content + - drupal:datetime_range - drupal:inline_form_errors - drupal:layout_builder - drupal:layout_discovery - drupal:media + - drupal:media_library - drupal:rest - field_group:field_group - layout_builder_restrictions:layout_builder_restrictions - menu_block:menu_block - paragraphs:paragraphs + - pathauto:pathauto - webform:webform regions: From ec063a49252c4596faf497759c05b1ac3306a1b0 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 7 Jul 2022 00:27:46 +1000 Subject: [PATCH 10/15] Fixed simple_sitemap bundle settings not being provisioned. --- .../contrib/civictheme/civictheme.info.yml | 3 --- .../civictheme/civictheme.provision.inc | 26 +++++++++++++++++++ ...settings.default.node.civictheme_event.yml | 4 --- ..._settings.default.node.civictheme_page.yml | 4 --- .../simple_sitemap.custom_links.default.yml | 5 ---- scripts/theme_excluded_configs.txt | 2 ++ 6 files changed, 28 insertions(+), 16 deletions(-) delete mode 100644 docroot/themes/contrib/civictheme/config/install/simple_sitemap.bundle_settings.default.node.civictheme_event.yml delete mode 100644 docroot/themes/contrib/civictheme/config/install/simple_sitemap.bundle_settings.default.node.civictheme_page.yml delete mode 100644 docroot/themes/contrib/civictheme/config/optional/simple_sitemap.custom_links.default.yml diff --git a/docroot/themes/contrib/civictheme/civictheme.info.yml b/docroot/themes/contrib/civictheme/civictheme.info.yml index 84f7da0f6..8e101ccef 100644 --- a/docroot/themes/contrib/civictheme/civictheme.info.yml +++ b/docroot/themes/contrib/civictheme/civictheme.info.yml @@ -559,8 +559,6 @@ config_devel: - pathauto.pattern.civictheme_alert - pathauto.pattern.civictheme_event - pathauto.pattern.civictheme_page - - simple_sitemap.bundle_settings.default.node.civictheme_event - - simple_sitemap.bundle_settings.default.node.civictheme_page - system.menu.civictheme-footer - system.menu.civictheme-primary-navigation - system.menu.civictheme-secondary-navigation @@ -577,5 +575,4 @@ config_devel: optional: - core.entity_view_mode.node.teaser - media.settings - - simple_sitemap.custom_links.default #;> DEVELOPMENT diff --git a/docroot/themes/contrib/civictheme/civictheme.provision.inc b/docroot/themes/contrib/civictheme/civictheme.provision.inc index 6463f1ff7..303a04bd7 100644 --- a/docroot/themes/contrib/civictheme/civictheme.provision.inc +++ b/docroot/themes/contrib/civictheme/civictheme.provision.inc @@ -827,6 +827,32 @@ function civictheme_provision__permissions() { } } +/** + * Provision simple sitemap. + */ +function civictheme_provision__simple_sitemap() { + if (\Drupal::moduleHandler()->moduleExists('simple_sitemap')) { + return; + } + + /** @var \Drupal\simple_sitemap\Manager\Generator $generator */ + $generator = \Drupal::service('simple_sitemap.generator'); + + $settings = [ + 'index' => TRUE, + 'priority' => 0.5, + 'changefreq' => 'hourly', + 'include_images' => FALSE, + ]; + + $bundles = ['civictheme_page', 'civictheme_event']; + foreach ($bundles as $bundle) { + $generator->entityManager()->setBundleSettings('node', $bundle, $settings); + } + + $generator->customLinkManager()->add('/', $settings); +} + /** * Map of roles and permissions to be granted. * diff --git a/docroot/themes/contrib/civictheme/config/install/simple_sitemap.bundle_settings.default.node.civictheme_event.yml b/docroot/themes/contrib/civictheme/config/install/simple_sitemap.bundle_settings.default.node.civictheme_event.yml deleted file mode 100644 index 8e55877d3..000000000 --- a/docroot/themes/contrib/civictheme/config/install/simple_sitemap.bundle_settings.default.node.civictheme_event.yml +++ /dev/null @@ -1,4 +0,0 @@ -index: true -priority: '0.5' -changefreq: '' -include_images: false diff --git a/docroot/themes/contrib/civictheme/config/install/simple_sitemap.bundle_settings.default.node.civictheme_page.yml b/docroot/themes/contrib/civictheme/config/install/simple_sitemap.bundle_settings.default.node.civictheme_page.yml deleted file mode 100644 index 8e55877d3..000000000 --- a/docroot/themes/contrib/civictheme/config/install/simple_sitemap.bundle_settings.default.node.civictheme_page.yml +++ /dev/null @@ -1,4 +0,0 @@ -index: true -priority: '0.5' -changefreq: '' -include_images: false diff --git a/docroot/themes/contrib/civictheme/config/optional/simple_sitemap.custom_links.default.yml b/docroot/themes/contrib/civictheme/config/optional/simple_sitemap.custom_links.default.yml deleted file mode 100644 index 7d9aed84b..000000000 --- a/docroot/themes/contrib/civictheme/config/optional/simple_sitemap.custom_links.default.yml +++ /dev/null @@ -1,5 +0,0 @@ -links: - - - path: / - priority: '1.0' - changefreq: daily diff --git a/scripts/theme_excluded_configs.txt b/scripts/theme_excluded_configs.txt index e5f7d263b..4e953ea73 100644 --- a/scripts/theme_excluded_configs.txt +++ b/scripts/theme_excluded_configs.txt @@ -96,6 +96,8 @@ shortcut.set.default simple_sitemap.settings simple_sitemap.sitemap.default simple_sitemap.type.default_hreflang +simple_sitemap.bundle_* +simple_sitemap.custom_links.* stage_file_proxy* system.action* system.advisories From 75b499f9caaf92c76df668f858426f9cea9b9c15 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 7 Jul 2022 00:31:22 +1000 Subject: [PATCH 11/15] Added CI job to install using standard profile to check that all deps are declared. --- .ahoy.yml | 1 + .circleci/config.yml | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.ahoy.yml b/.ahoy.yml index 5ca84b6b3..09d499d94 100644 --- a/.ahoy.yml +++ b/.ahoy.yml @@ -115,6 +115,7 @@ commands: docker-compose exec \ -e DREVOPS_DRUPAL_INSTALL_OPERATIONS_SKIP=${DREVOPS_DRUPAL_INSTALL_OPERATIONS_SKIP:-} \ -e DREVOPS_DRUPAL_INSTALL_OVERRIDE_EXISTING_DB=${DREVOPS_DRUPAL_INSTALL_OVERRIDE_EXISTING_DB:-0} \ + -e DREVOPS_DRUPAL_PROFILE=${DREVOPS_DRUPAL_PROFILE:-standard} \ -e SKIP_SUBTHEME_ACTIVATION=${SKIP_SUBTHEME_ACTIVATION:-0} \ -T cli ./scripts/drevops/drupal-install-site.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 74c3daf3f..1cf3ed8b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -121,7 +121,6 @@ aliases: - &step_process_codebase run: name: Process codebase to run in CI - command: | # Remove lines containing '###' and uncomment comments starting with '##'. sed -i -e "/###/d" docker-compose.yml && sed -i -e "s/##//" docker-compose.yml @@ -215,6 +214,24 @@ jobs: command: ahoy build no_output_timeout: 30m + # Standard profile. + build-alt3: + <<: *container_config + parallelism: 1 + environment: + SKIP_SUBTHEME_ACTIVATION: 1 + DREVOPS_DRUPAL_PROFILE: standard + steps: + - attach_workspace: + at: /workspace + - checkout + - *step_process_codebase + - *step_setup_remote_docker + - run: + name: Build site + command: ahoy build + no_output_timeout: 30m + # Deploy primary branches. deploy: &job_deploy <<: *container_config @@ -347,11 +364,16 @@ workflows: filters: tags: only: /.*/ + - build-alt3: + filters: + tags: + only: /.*/ - deploy: requires: - build - build-alt - build-alt2 + - build-alt3 filters: branches: # Allowed branches: @@ -368,6 +390,7 @@ workflows: - build - build-alt - build-alt2 + - build-alt3 filters: branches: ignore: /.*/ From f6fb6aa7b2cfc5d2639eb8a55eedf643fa6db091 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 7 Jul 2022 00:32:31 +1000 Subject: [PATCH 12/15] Updated dependencies. Changelogs summary: - drupal/core-project-message updated from 9.3.13 to 9.4.1 minor See changes: https://github.com/drupal/core-project-message/compare/9.3.13...9.4.1 Release notes: https://github.com/drupal/core-project-message/releases/tag/9.4.1 - drupal/core-composer-scaffold updated from 9.3.13 to 9.4.1 minor See changes: https://github.com/drupal/core-composer-scaffold/compare/9.3.13...9.4.1 Release notes: https://github.com/drupal/core-composer-scaffold/releases/tag/9.4.1 - chillerlan/php-settings-container updated from 2.1.3 to 2.1.4 patch See changes: https://github.com/chillerlan/php-settings-container/compare/2.1.3...2.1.4 Release notes: https://github.com/chillerlan/php-settings-container/releases/tag/2.1.4 - guzzlehttp/guzzle updated from 6.5.5 to 6.5.6 patch See changes: https://github.com/guzzle/guzzle/compare/6.5.5...6.5.6 Release notes: https://github.com/guzzle/guzzle/releases/tag/6.5.6 - drupal/core updated from 9.3.12 to 9.3.14 patch See changes: https://github.com/drupal/core/compare/9.3.12...9.3.14 Release notes: https://github.com/drupal/core/releases/tag/9.3.14 - composer/composer updated from 2.2.14 to 2.2.16 patch See changes: https://github.com/composer/composer/compare/2.2.14...2.2.16 Release notes: https://github.com/composer/composer/releases/tag/2.2.16 - drupal/ctools_block updated from 3.7.0 to 4.0.0 major - friends-of-behat/mink-extension updated from v2.6.1 to v2.7.1 minor See changes: https://github.com/FriendsOfBehat/MinkExtension/compare/v2.6.1...v2.7.1 Release notes: https://github.com/FriendsOfBehat/MinkExtension/releases/tag/v2.7.1 - league/uri updated from 6.6.0 to 6.7.1 minor See changes: https://github.com/thephpleague/uri/compare/6.6.0...6.7.1 Release notes: https://github.com/thephpleague/uri/releases/tag/6.7.1 - solarium/solarium updated from 6.2.3 to 6.2.4 patch See changes: https://github.com/solariumphp/solarium/compare/6.2.3...6.2.4 Release notes: https://github.com/solariumphp/solarium/releases/tag/6.2.4 - drupal/pathauto updated from 1.9.0 to 1.10.0 minor - drupal/paragraphs updated from 1.13.0 to 1.14.0 minor - drupal/media_file_delete installed in version 1.1.1 - drupal/layout_builder_restrictions updated from 2.12.0 to 2.13.0 minor - drupal/honeypot updated from 2.0.2 to 2.1.1 minor - drupal/environment_indicator updated from 4.0.5 to 4.0.6 patch - drupal/entity_hierarchy updated from 3.1.0 to 3.1.1 patch - drupal/core-recommended updated from 9.3.12 to 9.3.14 patch See changes: https://github.com/drupal/core-recommended/compare/9.3.12...9.3.14 Release notes: https://github.com/drupal/core-recommended/releases/tag/9.3.14 - govcms/govcms updated from 2.15.0 to 2.16.0 minor See changes: https://github.com/govCMS/GovCMS/compare/2.15.0...2.16.0 Release notes: https://github.com/govCMS/GovCMS/releases/tag/2.16.0 --- composer.lock | 349 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 223 insertions(+), 126 deletions(-) diff --git a/composer.lock b/composer.lock index 35a10a8e9..5b9a68a61 100644 --- a/composer.lock +++ b/composer.lock @@ -255,16 +255,16 @@ }, { "name": "chillerlan/php-settings-container", - "version": "2.1.3", + "version": "2.1.4", "source": { "type": "git", "url": "https://github.com/chillerlan/php-settings-container.git", - "reference": "125dd573b45ffc7cabecf385986a356ba2c6f602" + "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/125dd573b45ffc7cabecf385986a356ba2c6f602", - "reference": "125dd573b45ffc7cabecf385986a356ba2c6f602", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", + "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a", "shasum": "" }, "require": { @@ -315,7 +315,7 @@ "type": "ko_fi" } ], - "time": "2022-03-09T13:18:58+00:00" + "time": "2022-07-05T22:32:14+00:00" }, { "name": "christian-riesen/otp", @@ -3698,16 +3698,16 @@ }, { "name": "drupal/core", - "version": "9.3.12", + "version": "9.3.14", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "ed6af33093f66a9c5048d02f9f2c326ad0e7e90c" + "reference": "ea4c4780324c6ee6679823927e95601938d7f6a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/ed6af33093f66a9c5048d02f9f2c326ad0e7e90c", - "reference": "ed6af33093f66a9c5048d02f9f2c326ad0e7e90c", + "url": "https://api.github.com/repos/drupal/core/zipball/ea4c4780324c6ee6679823927e95601938d7f6a3", + "reference": "ea4c4780324c6ee6679823927e95601938d7f6a3", "shasum": "" }, "require": { @@ -3729,7 +3729,7 @@ "ext-spl": "*", "ext-tokenizer": "*", "ext-xml": "*", - "guzzlehttp/guzzle": "^6.5.2", + "guzzlehttp/guzzle": "^6.5.6", "laminas/laminas-diactoros": "^2.1", "laminas/laminas-feed": "^2.12", "masterminds/html5": "^2.1", @@ -3949,22 +3949,22 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/9.3.12" + "source": "https://github.com/drupal/core/tree/9.3.14" }, - "time": "2022-04-20T14:25:27+00:00" + "time": "2022-05-25T18:43:19+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "9.3.13", + "version": "9.4.1", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", - "reference": "a9dd9def8891e1c388719474720b57d3fe929a2f" + "reference": "5f37a9e4008b34e3e4f6bb34ce0b3f7e5ec8984f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-composer-scaffold/zipball/a9dd9def8891e1c388719474720b57d3fe929a2f", - "reference": "a9dd9def8891e1c388719474720b57d3fe929a2f", + "url": "https://api.github.com/repos/drupal/core-composer-scaffold/zipball/5f37a9e4008b34e3e4f6bb34ce0b3f7e5ec8984f", + "reference": "5f37a9e4008b34e3e4f6bb34ce0b3f7e5ec8984f", "shasum": "" }, "require": { @@ -3999,22 +3999,22 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/9.3.13" + "source": "https://github.com/drupal/core-composer-scaffold/tree/9.4.1" }, - "time": "2022-02-24T17:40:56+00:00" + "time": "2022-06-19T16:14:23+00:00" }, { "name": "drupal/core-project-message", - "version": "9.3.13", + "version": "9.4.1", "source": { "type": "git", "url": "https://github.com/drupal/core-project-message.git", - "reference": "69664743736977676e11f824301ea3e925a712fc" + "reference": "5dfa0b75a057caf6542be67f61e7531c737db48c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-project-message/zipball/69664743736977676e11f824301ea3e925a712fc", - "reference": "69664743736977676e11f824301ea3e925a712fc", + "url": "https://api.github.com/repos/drupal/core-project-message/zipball/5dfa0b75a057caf6542be67f61e7531c737db48c", + "reference": "5dfa0b75a057caf6542be67f61e7531c737db48c", "shasum": "" }, "require": { @@ -4040,22 +4040,22 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-project-message/tree/9.3.13" + "source": "https://github.com/drupal/core-project-message/tree/9.4.1" }, - "time": "2022-02-24T17:40:56+00:00" + "time": "2022-02-24T17:40:53+00:00" }, { "name": "drupal/core-recommended", - "version": "9.3.12", + "version": "9.3.14", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "a8fa50016c1aa1eb7f4e54f590e6343d286c418f" + "reference": "31f23ce0ae7cf3925f6fb6a3953762b259a0494e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/a8fa50016c1aa1eb7f4e54f590e6343d286c418f", - "reference": "a8fa50016c1aa1eb7f4e54f590e6343d286c418f", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/31f23ce0ae7cf3925f6fb6a3953762b259a0494e", + "reference": "31f23ce0ae7cf3925f6fb6a3953762b259a0494e", "shasum": "" }, "require": { @@ -4064,9 +4064,9 @@ "doctrine/annotations": "1.13.2", "doctrine/lexer": "1.2.1", "doctrine/reflection": "1.2.2", - "drupal/core": "9.3.12", + "drupal/core": "9.3.14", "egulias/email-validator": "3.1.2", - "guzzlehttp/guzzle": "6.5.5", + "guzzlehttp/guzzle": "6.5.6", "guzzlehttp/promises": "1.5.1", "guzzlehttp/psr7": "1.8.5", "laminas/laminas-diactoros": "2.8.0", @@ -4126,9 +4126,9 @@ ], "description": "Locked core dependencies; require this project INSTEAD OF drupal/core.", "support": { - "source": "https://github.com/drupal/core-recommended/tree/9.3.12" + "source": "https://github.com/drupal/core-recommended/tree/9.3.14" }, - "time": "2022-04-20T14:25:27+00:00" + "time": "2022-05-25T18:43:19+00:00" }, { "name": "drupal/crop", @@ -4282,16 +4282,16 @@ }, { "name": "drupal/ctools_block", - "version": "3.7.0", + "version": "4.0.0", "require": { - "drupal/core": "^8.8 || ^9", + "drupal/core": "^9.2 || ^10", "drupal/ctools": "*" }, "type": "metapackage", "extra": { "drupal": { - "version": "8.x-3.7", - "datestamp": "1623860918", + "version": "4.0.0", + "datestamp": "1656635481", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -5210,17 +5210,17 @@ }, { "name": "drupal/entity_hierarchy", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/entity_hierarchy.git", - "reference": "3.1.0" + "reference": "3.1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/entity_hierarchy-3.1.0.zip", - "reference": "3.1.0", - "shasum": "5698b5086d27aad4b66cbde724e9039c7fc7386a" + "url": "https://ftp.drupal.org/files/projects/entity_hierarchy-3.1.1.zip", + "reference": "3.1.1", + "shasum": "25902078b2924c717bfeb64e2341a822e020ca6e" }, "require": { "drupal/core": "^8.8 || ^9.0", @@ -5233,8 +5233,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "3.1.0", - "datestamp": "1647573249", + "version": "3.1.1", + "datestamp": "1649712573", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -5387,17 +5387,17 @@ }, { "name": "drupal/environment_indicator", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://git.drupalcode.org/project/environment_indicator.git", - "reference": "4.0.5" + "reference": "4.0.6" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/environment_indicator-4.0.5.zip", - "reference": "4.0.5", - "shasum": "1900f65220783c8eef13c710befff8d12633f36e" + "url": "https://ftp.drupal.org/files/projects/environment_indicator-4.0.6.zip", + "reference": "4.0.6", + "shasum": "63dc715096dd71cfed7085f30eae78005d08433c" }, "require": { "drupal/core": "^8.8 || ^9" @@ -5405,8 +5405,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "4.0.5", - "datestamp": "1646688932", + "version": "4.0.6", + "datestamp": "1652781055", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6017,26 +6017,29 @@ }, { "name": "drupal/honeypot", - "version": "2.0.2", + "version": "2.1.1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/honeypot.git", - "reference": "2.0.2" + "reference": "2.1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/honeypot-2.0.2.zip", - "reference": "2.0.2", - "shasum": "8a3e15509f649c39e88c4f22105f12fb6445fc62" + "url": "https://ftp.drupal.org/files/projects/honeypot-2.1.1.zip", + "reference": "2.1.1", + "shasum": "2f01297c8c6d1bdb2e5f4c3b2c8c7e8be521191c" }, "require": { - "drupal/core": "^8.8.2 || ^9" + "drupal/core": "^9.2 || ^10" + }, + "require-dev": { + "drupal/rules": "^3.0" }, "type": "drupal-module", "extra": { "drupal": { - "version": "2.0.2", - "datestamp": "1651895165", + "version": "2.1.1", + "datestamp": "1654198290", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6494,17 +6497,17 @@ }, { "name": "drupal/layout_builder_restrictions", - "version": "2.12.0", + "version": "2.13.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/layout_builder_restrictions.git", - "reference": "8.x-2.12" + "reference": "8.x-2.13" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/layout_builder_restrictions-8.x-2.12.zip", - "reference": "8.x-2.12", - "shasum": "3007e4c8ce406560444d46a18ed1856dd9a486d0" + "url": "https://ftp.drupal.org/files/projects/layout_builder_restrictions-8.x-2.13.zip", + "reference": "8.x-2.13", + "shasum": "2ff1a74d533cd785d3f3e8dae5ebc9d499771090" }, "require": { "drupal/core": "^8.8.0 || ^9.0" @@ -6517,8 +6520,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.12", - "datestamp": "1642181240", + "version": "8.x-2.13", + "datestamp": "1649945847", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6850,6 +6853,53 @@ "source": "https://git.drupalcode.org/project/media_entity_file_replace" } }, + { + "name": "drupal/media_file_delete", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/media_file_delete.git", + "reference": "1.1.1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/media_file_delete-1.1.1.zip", + "reference": "1.1.1", + "shasum": "015eaea59e4a876dd9c36b69553335932dde9b9d" + }, + "require": { + "drupal/core": "^8.8 || ~9.0" + }, + "require-dev": { + "drupal/entity_usage": "*" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "1.1.1", + "datestamp": "1651977836", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "larowlan", + "homepage": "https://www.drupal.org/user/395439" + } + ], + "description": "Provides content editors the ability to delete associated files when deleting media items", + "homepage": "https://www.drupal.org/project/media_file_delete", + "support": { + "source": "https://git.drupalcode.org/project/media_file_delete" + } + }, { "name": "drupal/menu_block", "version": "1.8.0", @@ -7727,20 +7777,20 @@ }, { "name": "drupal/paragraphs", - "version": "1.13.0", + "version": "1.14.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/paragraphs.git", - "reference": "8.x-1.13" + "reference": "8.x-1.14" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/paragraphs-8.x-1.13.zip", - "reference": "8.x-1.13", - "shasum": "5e06df68411b17a5d8adaa292ddf70840d00876f" + "url": "https://ftp.drupal.org/files/projects/paragraphs-8.x-1.14.zip", + "reference": "8.x-1.14", + "shasum": "caa1a945dcfd058c4937c4907743eed970ce14cc" }, "require": { - "drupal/core": "^8.8 || ^9", + "drupal/core": "^9.2", "drupal/entity_reference_revisions": "~1.3" }, "require-dev": { @@ -7762,8 +7812,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.13", - "datestamp": "1646121716", + "version": "8.x-1.14", + "datestamp": "1650520869", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7874,17 +7924,17 @@ }, { "name": "drupal/pathauto", - "version": "1.9.0", + "version": "1.10.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/pathauto.git", - "reference": "8.x-1.9" + "reference": "8.x-1.10" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/pathauto-8.x-1.9.zip", - "reference": "8.x-1.9", - "shasum": "f075ebff595c9b8b62333d65ad29020330e0ea9d" + "url": "https://ftp.drupal.org/files/projects/pathauto-8.x-1.10.zip", + "reference": "8.x-1.10", + "shasum": "f49d5fbcd7a2c1b4de1da07194fe01d9012237ec" }, "require": { "drupal/core": "^8.8 || ^9", @@ -7897,8 +7947,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.9", - "datestamp": "1644822949", + "version": "8.x-1.10", + "datestamp": "1650806739", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -9899,16 +9949,16 @@ }, { "name": "govcms/govcms", - "version": "2.15.0", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/govCMS/GovCMS.git", - "reference": "993a79798e1607c0fab435aa5644140be734c15e" + "reference": "a5b7f09043b7cd32df56fbf92f40c08efa310415" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/govCMS/GovCMS/zipball/993a79798e1607c0fab435aa5644140be734c15e", - "reference": "993a79798e1607c0fab435aa5644140be734c15e", + "url": "https://api.github.com/repos/govCMS/GovCMS/zipball/a5b7f09043b7cd32df56fbf92f40c08efa310415", + "reference": "a5b7f09043b7cd32df56fbf92f40c08efa310415", "shasum": "" }, "require": { @@ -9932,7 +9982,7 @@ "drupal/contact_storage": "1.1.0", "drupal/context": "4.1.0", "drupal/core-composer-scaffold": "^9", - "drupal/core-recommended": "9.3.12", + "drupal/core-recommended": "9.3.14", "drupal/crop": "2.2.0", "drupal/ctools": "3.7.0", "drupal/devel": "4.1.5", @@ -9940,14 +9990,15 @@ "drupal/dropzonejs": "2.6.0", "drupal/ds": "3.13.0", "drupal/dynamic_entity_reference": "1.16.0", + "drupal/embed": "1.5", "drupal/encrypt": "3.0", "drupal/entity_browser": "2.6.0", "drupal/entity_class_formatter": "1.3", "drupal/entity_embed": "1.2.0", - "drupal/entity_hierarchy": "3.1.0", + "drupal/entity_hierarchy": "3.1.1", "drupal/entity_reference_display": "1.4.0", "drupal/entity_reference_revisions": "1.9.0", - "drupal/environment_indicator": "4.0.5", + "drupal/environment_indicator": "4.0.6", "drupal/facets": "1.8.0", "drupal/fakeobjects": "1.1", "drupal/features": "3.12.0", @@ -9956,15 +10007,16 @@ "drupal/ga_login": "1.0.0-alpha6", "drupal/google_analytics": "4.0.0", "drupal/govcms_dlm": "1.4.0", - "drupal/honeypot": "2.0.2", + "drupal/honeypot": "2.1.1", "drupal/inline_entity_form": "1.0.0-rc11", "drupal/key": "1.15.0", "drupal/layout_builder_modal": "1.1", - "drupal/layout_builder_restrictions": "2.12.0", + "drupal/layout_builder_restrictions": "2.13.0", "drupal/linked_field": "1.3.0", "drupal/linkit": "6.0.0-beta3", "drupal/login_security": "2.0.0", "drupal/media_entity_file_replace": "1.0", + "drupal/media_file_delete": "1.1.1", "drupal/menu_block": "1.8.0", "drupal/menu_trail_by_path": "1.3", "drupal/metatag": "1.19.0", @@ -9977,9 +10029,9 @@ "drupal/module_permissions": "3.1.0", "drupal/panelizer": "4.4", "drupal/panels": "4.6.0", - "drupal/paragraphs": "1.13.0", + "drupal/paragraphs": "1.14.0", "drupal/password_policy": "3.1.0", - "drupal/pathauto": "1.9.0", + "drupal/pathauto": "1.10.0", "drupal/real_aes": "2.4.0", "drupal/recaptcha": "3.0", "drupal/redirect": "1.7.0", @@ -10092,7 +10144,7 @@ "source": "https://github.com/GovCMS/GovCMS/releases", "wik": "https://github.com/GovCMS/GovCMS/wiki" }, - "time": "2022-05-17T03:06:06+00:00" + "time": "2022-06-13T23:10:24+00:00" }, { "name": "graham-campbell/result-type", @@ -10261,16 +10313,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "version": "6.5.6", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "reference": "f092dd734083473658de3ee4bef093ed77d2689c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f092dd734083473658de3ee4bef093ed77d2689c", + "reference": "f092dd734083473658de3ee4bef093ed77d2689c", "shasum": "" }, "require": { @@ -10307,10 +10359,40 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", @@ -10326,9 +10408,23 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5" + "source": "https://github.com/guzzle/guzzle/tree/6.5.6" }, - "time": "2020-06-16T21:01:06+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-05-25T13:19:12+00:00" }, { "name": "guzzlehttp/promises", @@ -11356,16 +11452,16 @@ }, { "name": "league/uri", - "version": "6.6.0", + "version": "6.7.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298" + "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/4147f19b9de3b5af6a258f35d7a0efbbf9963298", - "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", + "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", "shasum": "" }, "require": { @@ -11379,6 +11475,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^v3.3.2", + "nyholm/psr7": "^1.5", "php-http/psr7-integration-tests": "^1.1", "phpstan/phpstan": "^1.2.0", "phpstan/phpstan-deprecation-rules": "^1.0", @@ -11442,7 +11539,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.6.0" + "source": "https://github.com/thephpleague/uri/tree/6.7.1" }, "funding": [ { @@ -11450,7 +11547,7 @@ "type": "github" } ], - "time": "2022-05-28T05:44:35+00:00" + "time": "2022-06-29T09:48:18+00:00" }, { "name": "league/uri-interfaces", @@ -12828,16 +12925,16 @@ }, { "name": "solarium/solarium", - "version": "6.2.3", + "version": "6.2.4", "source": { "type": "git", "url": "https://github.com/solariumphp/solarium.git", - "reference": "f91185d07d9d3f40ef92810e182e621c51635e8b" + "reference": "fcec5684ee3f2d73a8f06a9fbd0e25d2537e1ab2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/solariumphp/solarium/zipball/f91185d07d9d3f40ef92810e182e621c51635e8b", - "reference": "f91185d07d9d3f40ef92810e182e621c51635e8b", + "url": "https://api.github.com/repos/solariumphp/solarium/zipball/fcec5684ee3f2d73a8f06a9fbd0e25d2537e1ab2", + "reference": "fcec5684ee3f2d73a8f06a9fbd0e25d2537e1ab2", "shasum": "" }, "require": { @@ -12846,7 +12943,7 @@ "psr/event-dispatcher": "^1.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", - "symfony/event-dispatcher-contracts": "^1.0 || ^2.0" + "symfony/event-dispatcher-contracts": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { "escapestudios/symfony2-coding-standard": "^3.11", @@ -12854,11 +12951,11 @@ "nyholm/psr7": "^1.2", "php-http/guzzle7-adapter": "^0.1", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^9.5", "roave/security-advisories": "dev-master", - "symfony/event-dispatcher": "^4.3 || ^5.0" + "symfony/event-dispatcher": "^4.3 || ^5.0 || ^6.0" }, "type": "library", "autoload": { @@ -12885,9 +12982,9 @@ ], "support": { "issues": "https://github.com/solariumphp/solarium/issues", - "source": "https://github.com/solariumphp/solarium/tree/6.2.3" + "source": "https://github.com/solariumphp/solarium/tree/6.2.4" }, - "time": "2022-01-31T15:37:35+00:00" + "time": "2022-06-30T10:48:47+00:00" }, { "name": "stack/builder", @@ -16696,16 +16793,16 @@ }, { "name": "composer/composer", - "version": "2.2.14", + "version": "2.2.16", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "8c7a2d200bb0e66d6fafeff2f9c9a27188e52842" + "reference": "8c0ee53ff67399b0eec4eee2c5dc5189ec6938a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/8c7a2d200bb0e66d6fafeff2f9c9a27188e52842", - "reference": "8c7a2d200bb0e66d6fafeff2f9c9a27188e52842", + "url": "https://api.github.com/repos/composer/composer/zipball/8c0ee53ff67399b0eec4eee2c5dc5189ec6938a6", + "reference": "8c0ee53ff67399b0eec4eee2c5dc5189ec6938a6", "shasum": "" }, "require": { @@ -16775,7 +16872,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.2.14" + "source": "https://github.com/composer/composer/tree/2.2.16" }, "funding": [ { @@ -16791,7 +16888,7 @@ "type": "tidelift" } ], - "time": "2022-06-06T14:32:50+00:00" + "time": "2022-07-05T14:50:29+00:00" }, { "name": "composer/metadata-minifier", @@ -17837,16 +17934,16 @@ }, { "name": "friends-of-behat/mink-extension", - "version": "v2.6.1", + "version": "v2.7.1", "source": { "type": "git", "url": "https://github.com/FriendsOfBehat/MinkExtension.git", - "reference": "df04efb3e88833208c3a99a3efa3f7e9f03854db" + "reference": "9f8bcde32e427d9de1a722ee6004529381f8c435" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfBehat/MinkExtension/zipball/df04efb3e88833208c3a99a3efa3f7e9f03854db", - "reference": "df04efb3e88833208c3a99a3efa3f7e9f03854db", + "url": "https://api.github.com/repos/FriendsOfBehat/MinkExtension/zipball/9f8bcde32e427d9de1a722ee6004529381f8c435", + "reference": "9f8bcde32e427d9de1a722ee6004529381f8c435", "shasum": "" }, "require": { @@ -17896,9 +17993,9 @@ "web" ], "support": { - "source": "https://github.com/FriendsOfBehat/MinkExtension/tree/v2.6.1" + "source": "https://github.com/FriendsOfBehat/MinkExtension/tree/v2.7.1" }, - "time": "2021-12-24T13:19:26+00:00" + "time": "2022-07-01T09:37:40+00:00" }, { "name": "instaclick/php-webdriver", From f3a7011057ff7c67ab6436319a9b1e8e3186e1c7 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 7 Jul 2022 01:00:58 +1000 Subject: [PATCH 13/15] Fixed sitemap provisioning. --- docroot/themes/contrib/civictheme/civictheme.provision.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docroot/themes/contrib/civictheme/civictheme.provision.inc b/docroot/themes/contrib/civictheme/civictheme.provision.inc index 303a04bd7..150302771 100644 --- a/docroot/themes/contrib/civictheme/civictheme.provision.inc +++ b/docroot/themes/contrib/civictheme/civictheme.provision.inc @@ -831,8 +831,8 @@ function civictheme_provision__permissions() { * Provision simple sitemap. */ function civictheme_provision__simple_sitemap() { - if (\Drupal::moduleHandler()->moduleExists('simple_sitemap')) { - return; + if (!\Drupal::moduleHandler()->moduleExists('simple_sitemap')) { + \Drupal::service('module_installer')->install(['simple_sitemap']); } /** @var \Drupal\simple_sitemap\Manager\Generator $generator */ From 5a575fd2622bc14b179d63dd8a6c372084323581 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 7 Jul 2022 07:43:41 +1000 Subject: [PATCH 14/15] Do not install civictheme_govcms if using standard profile. --- .../drupal-install-site-1-enable-modules.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/custom/drupal-install-site-1-enable-modules.sh b/scripts/custom/drupal-install-site-1-enable-modules.sh index 8f01a3ddb..5db526b2b 100755 --- a/scripts/custom/drupal-install-site-1-enable-modules.sh +++ b/scripts/custom/drupal-install-site-1-enable-modules.sh @@ -19,7 +19,7 @@ DRUSH_ALIAS="${DRUSH_ALIAS:-}" drush="$(if [ -f "${APP}/vendor/bin/drush" ]; then echo "${APP}/vendor/bin/drush"; else command -v drush; fi)" echo "==> Removing all files." -rm -Rf "${APP}"/docroot/sites/default/files/* > /dev/null || true +rm -Rf "${APP}"/docroot/sites/default/files/* >/dev/null || true echo " > Enable modules required by CivicTheme." $drush ${DRUSH_ALIAS} ev "require_once dirname(\Drupal::getContainer()->get('theme_handler')->rebuildThemeData()['civictheme']->getPathname()) . '/civictheme.provision.inc'; civictheme_enable_modules();" @@ -33,11 +33,13 @@ $drush ${DRUSH_ALIAS} -y then civictheme $drush ${DRUSH_ALIAS} -y config-set system.theme default civictheme $drush ${DRUSH_ALIAS} -y config-set media.settings standalone_url true -echo " > Uninstall obsolete themes." -$drush ${DRUSH_ALIAS} -y thun claro || true -$drush ${DRUSH_ALIAS} -y thun govcms_bartik || true -$drush ${DRUSH_ALIAS} -y thun bartik || true +if [ "${DREVOPS_DRUPAL_PROFILE}" = "govcms" ]; then + echo " > Uninstall obsolete themes." + $drush ${DRUSH_ALIAS} -y thun claro || true + $drush ${DRUSH_ALIAS} -y thun govcms_bartik || true + $drush ${DRUSH_ALIAS} -y thun bartik || true -echo " > Remove GovCMS configs." -$drush ${DRUSH_ALIAS} -y pm-enable civictheme_govcms -$drush ${DRUSH_ALIAS} civictheme_govcms:remove-config + echo " > Remove GovCMS configs." + $drush ${DRUSH_ALIAS} -y pm-enable civictheme_govcms + $drush ${DRUSH_ALIAS} civictheme_govcms:remove-config +fi From a6bf3a1f9ac47665808e50a7834a80b143981a4e Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 7 Jul 2022 08:48:42 +1000 Subject: [PATCH 15/15] Added missing dependency. --- docroot/modules/custom/cs_core/cs_core.info.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docroot/modules/custom/cs_core/cs_core.info.yml b/docroot/modules/custom/cs_core/cs_core.info.yml index 8c33df000..9e4831749 100644 --- a/docroot/modules/custom/cs_core/cs_core.info.yml +++ b/docroot/modules/custom/cs_core/cs_core.info.yml @@ -10,6 +10,7 @@ dependencies: - adminimal_admin_toolbar:adminimal_admin_toolbar - coffee:coffee - config_devel:config_devel + - config_filter:config_filter - config_update:config_update - environment_indicator:environment_indicator - permissions_filter:permissions_filter