Skip to content

Commit

Permalink
Fixes #1227: Add target to sync all local multisite dbs. (#1229)
Browse files Browse the repository at this point in the history
* Fixes #1227: Add target to sync all local multisite dbs.

* Duplicating logic rather than splitting into separate target.
  • Loading branch information
grasmash authored Apr 3, 2017
1 parent 0850514 commit 6353dcc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions phing/tasks/local-sync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@
</if>
</target>

<target name="local:sync:db:all" description="Iteratively synchronizes local database from remote for each multisite listed in multisite.name">
<foreach list="${multisite.name}" param="multisite.name" target="local:sync:db:multisite"/>
</target>

<target name="local:sync:db:multisite" hidden="true">
<if>
<!-- There is multisite config. Allow it to override default values. -->
<available file="${blt.config-files.multisite}" />
<then>
<property file="${blt.config-files.multisite}" logoutput="false" override="true"/>
<!--
Here we override drush.uri explicitly (which defaults to 'default')
in order to run commands against multisite.name.
-->
<property name="drush.uri" value="${multisite.name}" override="true"/>
</then>
</if>
<phingcall target="local:sync:db"/>
</target>

<target name="local:sync:db" description="Synchronize local database from remote (remote --> local)."
depends="setup:drupal:settings">
<drush command="cc drush"/>
Expand Down

2 comments on commit 6353dcc

@cosmicdreams
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question about the versions. Is this change in 8.8.2 AND 8.7.0-beta3?

@grasmash
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in all of the following releases at present: 8.8.2 8.8.1 8.8.0 8.7.2 8.7.1 8.7.0 8.7.0-beta4 8.7.0-beta3

Please sign in to comment.