Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Fixes #1078, #1029, #1013, #966: Allow configuration directory and partial flag to be configurable. #1080

Merged
merged 1 commit into from
Feb 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion phing/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ composer:

cm:
core:
config-dir: sync
config-dir:
# Corresponding values are defined in default.local.settings.php.
key: sync
path: ${repo.root}/config/default
# A different config key is used by the deploy:update step, which is executed on Acquia Cloud.
deploy-key: vcs
partial: true


deploy:
# If true, dependencies will be built during deploy. If false, you should commit dependencies directly.
Expand Down
2 changes: 1 addition & 1 deletion phing/tasks/deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
<property name="drush.alias" value="self"/>
<!-- Most sites store their version-controlled configuration in /config/default. -->
<!-- ACE internally sets the vcs configuration directory to /config/default, so we use that. -->
<property name="cm.core.config-dir" value="vcs"/>
<property name="cm.config-dir.key" value="${cm.config-dir.deploy-key}"/>
</phingcall>
</target>

Expand Down
59 changes: 44 additions & 15 deletions phing/tasks/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,34 @@
</if>

<echo>Installing Drupal...</echo>
<drush command="site-install">
<option name="site-name">"${project.human_name}"</option>
<option name="site-mail">"${drupal.account.mail}"</option>
<option name="account-name">"${drupal.account.name}"</option>
<option name="account-pass">"${drupal.account.password}"</option>
<option name="account-mail">"${drupal.account.mail}"</option>
<option name="locale">"${drupal.locale}"</option>
<param>"${project.profile.name}"</param>
<param>"install_configure_form.update_status_module='array(FALSE,FALSE)'"</param>
</drush>

<if>
<equals arg1="${cm.core.partial}" arg2="true"/>
<then>
<drush command="site-install">
<option name="site-name">"${project.human_name}"</option>
<option name="site-mail">"${drupal.account.mail}"</option>
<option name="account-name">"${drupal.account.name}"</option>
<option name="account-pass">"${drupal.account.password}"</option>
<option name="account-mail">"${drupal.account.mail}"</option>
<option name="locale">"${drupal.locale}"</option>
<param>"${project.profile.name}"</param>
<param>"install_configure_form.update_status_module='array(FALSE,FALSE)'"</param>
</drush>
</then>
<else>
<drush command="site-install">
<option name="site-name">"${project.human_name}"</option>
<option name="site-mail">"${drupal.account.mail}"</option>
<option name="account-name">"${drupal.account.name}"</option>
<option name="account-pass">"${drupal.account.password}"</option>
<option name="account-mail">"${drupal.account.mail}"</option>
<option name="locale">"${drupal.locale}"</option>
<option name="config-dir">${cm.core.config-dir.path}</option>
<param>"${project.profile.name}"</param>
<param>"install_configure_form.update_status_module='array(FALSE,FALSE)'"</param>
</drush>
</else>
</if>
<phingcall target="setup:update"/>

<!-- Set sites directory file permissions. -->
Expand Down Expand Up @@ -224,11 +241,23 @@
<drush command="updb" assume="yes" alias="${drush.alias}" passthru="false">
<option name="entity-updates"></option>
</drush>

<!-- Import configuration. -->
<drush command="config-import" assume="yes" alias="${drush.alias}" passthru="false">
<option name="partial"></option>
<param>${cm.core.config-dir}</param>
</drush>
<if>
<equals arg1="${cm.core.partial}" arg2="true"/>
<then>
<drush command="config-import" assume="yes" alias="${drush.alias}" passthru="false">
<option name="partial"></option>
<param>${cm.core.config-dir.key}</param>
</drush>
</then>
<else>
<drush command="config-import" assume="yes" alias="${drush.alias}" passthru="false">
<param>${cm.core.config-dir.key}</param>
</drush>
</else>
</if>

<if>
<isset property="cm.features.bundle"/>
<then>
Expand Down