check for structure_sync module before drush im ib on deploy-drupal.sh

This commit is contained in:
2026-09-25 12:03:35 +02:00
parent a1868c537a
commit a7d53e2cd8
+8 -1
View File
@@ -78,10 +78,17 @@ vendor/bin/drush updb -y --ansi
step "Importing configuration" step "Importing configuration"
vendor/bin/drush config-import -y --ansi vendor/bin/drush config-import -y --ansi
#drush csim prod -y #drush csim prod -y
step "Importing content and blocks (structure_sync)"
# Only when structure_sync is enabled on this environment (config_split aware).
if vendor/bin/drush php:eval 'echo \Drupal::moduleHandler()->moduleExists("structure_sync") ? "yes" : "no";' 2>/dev/null | grep -q "yes"; then
vendor/bin/drush im --choice safe --ansi vendor/bin/drush im --choice safe --ansi
vendor/bin/drush ib --choice full --ansi vendor/bin/drush ib --choice full --ansi
else
echo "structure_sync is not enabled on this environment, skipping im/ib."
fi
# step "Regen path aliases" step "Regen path aliases"
#drush pag all canonical_entities:node #drush pag all canonical_entities:node
#drush pag all canonical_entities:taxonomy_term #drush pag all canonical_entities:taxonomy_term