File tree Expand file tree Collapse file tree 6 files changed +42
-13
lines changed
generators/app/templates/deploy-environment Expand file tree Collapse file tree 6 files changed +42
-13
lines changed Original file line number Diff line number Diff line change 4343 composer install
4444 chmod 777 -R ./web/sites/default/files
4545 cd web
46- if [ -f /var/www/<%= appName % >/config/sync/core.extension.yml ] ; then echo 'Install with config' ; /usr/bin/env PHP_OPTIONS="-d sendmail_path=`which true`" ../vendor/bin/drush si <%= appName % > -y ; ../vendor/bin/drush config-set "system.site" uuid $SITE_UUID -y ; ../vendor/bin/drush cim -y ; else echo 'Install without config' ; /usr/bin/env PHP_OPTIONS="-d sendmail_path=`which true`" ../vendor/bin/drush si <%= appName % > -y ; fi
46+ /usr/bin/env PHP_OPTIONS="-d sendmail_path=`which true`"
47+ if [ -f /var/www/<%= appName % >/config/sync/core.extension.yml ]; then
48+ echo "Installing with existing config..."
49+ ../vendor/bin/drush si standard --config-dir="sites/default/config/sync" -y
50+ else
51+ echo 'Install without config ...'
52+ ../vendor/bin/drush si standard -y
53+ fi
4754 cd /var/www/<%= appName % >
4855 - run :
4956 name : Coding Standards Linters
@@ -156,10 +163,9 @@ jobs:
156163 terminus connection:set <%= dashedAppName % >.dev git
157164 ahoy site deploy master "Auto deploy triggered from master branch"
158165 terminus connection:set <%= dashedAppName % >.dev sftp
159- terminus drush <%= dashedAppName % >.dev -- si <%= appName % > --account-pass=admin -y
166+ terminus drush <%= dashedAppName % >.dev -- si <%= appName % > --account-pass=admin --config-dir="sites/default/config/sync" - y
160167 terminus connection:set <%= dashedAppName % >.dev git
161168 terminus drush <%= dashedAppName % >.dev -- config-set "system.site" uuid "$SITE_UUID" -y
162- terminus drush <%= dashedAppName % >.dev -- cim -y
163169 terminus drush <%= dashedAppName % >.dev -- cr
164170 deploy-test :
165171 docker :
Original file line number Diff line number Diff line change 2020 "kporras07/composer-symlinks" : " dev-master" ,
2121 "drupal/core-recommended" : " <%= coreVersion %>" ,
2222 "cweagans/composer-patches" : " ^1.6.5" ,
23- "pantheon-systems/drupal-integrations" : " ^8.0"
23+ "pantheon-systems/drupal-integrations" : " ^8.0" ,
24+ "drush/drush" : " ^9.7.1 | ^10.0.0" ,
2425 },
2526 "require-dev" : {
2627 "testdrupal/behatextension" : " dev-update" ,
27- "drush/drush" : " ^9.7.1 | ^10.0.0" ,
2828 "squizlabs/php_codesniffer" : " ^3.5" ,
2929 "drupal/coder" : " ^8.2" ,
3030 "behat/behat" : " 3.4.0" ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ commands:
2222 find ./web/libraries/ -name ".git" -exec rm -rf {} \;
2323 find ./web/sites/all/libraries/ -name ".git" -exec rm -rf {} \;
2424 cp -r web $CLONEFOLDER/web
25+ cp -r {package.json,package-lock.json} $CLONEFOLDER
2526 mv vendor $CLONEFOLDER/
2627 cp pantheon.yml $CLONEFOLDER/
2728 cd $CLONEFOLDER
@@ -51,9 +52,17 @@ commands:
5152 install :
5253 usage : Run install commands
5354 cmd : |
55+ SITE_UUID="<%= siteUuid % >"
5456 ahoy drush cc drush
55- echo "Installing..."
56- ahoy drush site-install standard --account-pass=admin --site-name="<%= humanName % >" -y
57+ if [ -f ./config/sync/core.extension.yml ]; then
58+ echo "Installing with existing config..."
59+ ahoy drush site-install standard --account-pass=admin --site-name="<%= humanName % >" --config-dir="sites/default/config/sync" -y
60+ else
61+ echo "Installing the new site..."
62+ ahoy drush site-install standard --account-pass=admin --site-name="<%= humanName % >" -y
63+ echo "Set site uuid..."
64+ ahoy drush config-set "system.site" uuid "$SITE_UUID" -y
65+ fi
5766 echo "Cleaning cache..."
5867 ahoy drush cr
5968 install-from-db :
Original file line number Diff line number Diff line change 4343 composer install
4444 chmod 777 -R ./web/sites/default/files
4545 cd web
46- if [ -f /var/www/<%= appName % >/config/sync/core.extension.yml ] ; then echo 'Install with config' ; /usr/bin/env PHP_OPTIONS="-d sendmail_path=`which true`" ../vendor/bin/drush si standard -y ; ../vendor/bin/drush cim -y ; else echo 'Install without config' ; /usr/bin/env PHP_OPTIONS="-d sendmail_path=`which true`" ../vendor/bin/drush si standard -y ; fi
46+ /usr/bin/env PHP_OPTIONS="-d sendmail_path=`which true`"
47+ if [ -f /var/www/<%= appName % >/config/sync/core.extension.yml ]; then
48+ echo "Installing with existing config..."
49+ ../vendor/bin/drush si standard --config-dir="sites/default/config/sync" -y
50+ else
51+ echo 'Install without config ...'
52+ ../vendor/bin/drush si standard -y
53+ fi
4754 cd /var/www/<%= appName % >
4855 - run :
4956 name : Coding Standards Linters
Original file line number Diff line number Diff line change 2121 "drupal/core-recommended" : " <%= coreVersion %>" ,
2222 "cweagans/composer-patches" : " ^1.6.5" ,
2323 "drupal/redis" : " ^1.4" ,
24- "drupal/search_api_solr" : " ^3.9 " ,
24+ "drupal/search_api_solr" : " ^4.0 " ,
2525 "drush/drush" : " ^9.7.1 | ^10.0.0" ,
2626 "platformsh/config-reader" : " ^2.3" ,
2727 "symfony/event-dispatcher" : " 4.3.4 as 3.4.35"
8282 "root/.gitignore" : " web/.gitignore" ,
8383 "settings/settings.php" : " web/sites/default/settings.php" ,
8484 "settings/settings.local.php" : " web/sites/default/settings.local.php" ,
85- "settings/settings.platformsh.php" :
86- " web/sites/default/settings.platformsh.php" ,
85+ "settings/settings.platformsh.php" : " web/sites/default/settings.platformsh.php" ,
8786 "settings/settings.secret.php" : " web/sites/default/settings.secret.php" ,
8887 "settings/services.yml" : " web/sites/default/services.yml" ,
8988 "settings/services.local.yml" : " web/sites/default/services.local.yml" ,
Original file line number Diff line number Diff line change @@ -37,9 +37,17 @@ commands:
3737 install :
3838 usage : Run install commands
3939 cmd : |
40+ SITE_UUID="<%= siteUuid % >"
4041 ahoy drush cc drush
41- echo "Installing..."
42- ahoy drush site-install standard --account-pass=admin --site-name="<%= humanName % >" -y
42+ if [ -f ./config/sync/core.extension.yml ]; then
43+ echo "Installing with existing config..."
44+ ahoy drush site-install standard --account-pass=admin --site-name="<%= humanName % >" --config-dir="sites/default/config/sync" -y
45+ else
46+ echo "Installing the new site..."
47+ ahoy drush site-install standard --account-pass=admin --site-name="<%= humanName % >" -y
48+ echo "Set site uuid..."
49+ ahoy drush config-set "system.site" uuid "$SITE_UUID" -y
50+ fi
4351 echo "Cleaning cache..."
4452 ahoy drush cr
4553 install-from-db :
You can’t perform that action at this time.
0 commit comments