Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local:sync:files task. #1136

Merged
merged 1 commit into from
Mar 1, 2017
Merged
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
15 changes: 15 additions & 0 deletions phing/tasks/local-sync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@
<drush command="cache-rebuild"/>
</target>

<target name="local:sync:files" description="Synchronize local files from remote (remote --> local).">
<property name="site.name" value="${multisite.name}"/>
<if>
<!-- If ${multisite.name} is a list, assume we're syncing the default site's files. -->
<contains string="${site.name}" substring=","/>
<then>
<property name="site.name" value="default" override="true"/>
</then>
</if>
<drush command="rsync" alias="">
<param>@${drush.aliases.remote}:%files/</param>
<param>${docroot}/sites/${site.name}/files</param>
</drush>
</target>

<target name="local:update" description="Update current database to reflect the state of the Drupal file system; uses local drush alias.">
<phingcall target="setup:update">
<property name="drush.alias" value="${drush.aliases.local}"/>
Expand Down