Skip to content

Commit

Permalink
Merge pull request #44 from palantirnet/composer-install-elsewhere-fl…
Browse files Browse the repository at this point in the history
…exibility

Make the drupal root name and the conf dir location configurable in c…
  • Loading branch information
becw authored Jan 18, 2017
2 parents 8cbfb16 + bd60156 commit c683695
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tasks/lib/artifacts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
<fail unless="drupal.root" />
<fail unless="drupal.sites_subdir" />

<!-- Relative path to the Drupal root within the install dir -->
<property name="drupal.root_name" value="docroot/" />
<!-- Path where the conf dir should be copied -->
<property name="install_conf_dir" refid="install_dir" />

<!-- Remove all the existing files so that we can install cleanly. -->
<delete includeemptydirs="true">
<fileset dir="${install_dir}" />
Expand All @@ -49,7 +54,7 @@
-->
<filterchain>
<replaceregexp>
<regexp pattern="web(/[^\]]+type:drupal-)" replace="docroot\1" />
<regexp pattern="web/([^\]]+type:drupal-)" replace="${drupal.root_name}\1" />
</replaceregexp>
</filterchain>
</copy>
Expand All @@ -76,7 +81,7 @@
-->
<tempfile property="tmpfile" destdir="${build.dir}/artifacts" />
<exec command="git ls-files conf" dir="${build.dir}" output="${tmpfile}" />
<copy todir="${install_dir}" overwrite="true" haltonerror="true">
<copy todir="${install_conf_dir}" overwrite="true" haltonerror="true">
<filelist dir="${build.dir}" listfile="${tmpfile}" />
</copy>
<delete file="${tmpfile}" />
Expand Down

0 comments on commit c683695

Please sign in to comment.