You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The one additional thing that I find I have to do on every project is to create one more config split that is always on for everybody to hold the config_split configs for the local/dev/prod/whatever. I usually call it _splits and it allows me to override the drush-config-import script in pots, and add
before the main config import. […] If you don’t do this, you run into problems deploying anything that changes the config splits themselves, as those changes are picked up during the config import step, but they won’t actually apply until config import is run a second time, which has caused me all sorts of problems in the past if you aren’t aware of it and adding manual steps to any deployment.
Below is the implementation that was proposed for Pots
#!/bin/bashset -eo pipefail
P_SITE="$1"
P_ENV="$2"if [[ -z"$P_SITE" ]];then
P_SITE="$TERMINUS_SITE"fiif [[ -z"$P_ENV" ]];then
P_ENV="$TERMINUS_ENV"fiif [[ -z"$P_SITE" ]] || [[ -z"$P_ENV" ]];thenecho"Provide a site and enviornment."exit 1
fi# Check for a system.site.yml file somewhere in the config directory.if find ./config -name "system.site.yml"| grep "./config" -q ;thenecho"Importing Configuration"
terminus -n drush "$P_SITE.$P_ENV" -- config-import --source="../config/_splits" --partial --yes
terminus -n drush "$P_SITE.$P_ENV" -- cr
terminus -n drush "$P_SITE.$P_ENV" -- config-import --yes
elseecho"We didn't import any configuration."fi# Clear Drupal cacheecho"Clearing Drupal cache again."
terminus -n drush "$P_SITE.$P_ENV" -- cr
if [[ $(terminus -n drush "$P_SITE.$P_ENV" -- cst) ]]
thenecho"Config mismatch after config import. See report below."
terminus -n drush "$P_SITE.$P_ENV" -- cst
exit 1
fi
The text was updated successfully, but these errors were encountered:
Based on this conversation,
Below is the implementation that was proposed for Pots
The text was updated successfully, but these errors were encountered: