Skip to content

Commit

Permalink
Merge pull request #94 from palantirnet/deprecate-modules-enable
Browse files Browse the repository at this point in the history
Remove the 'drupal.modules_enable' property/behavior
  • Loading branch information
becw authored Sep 12, 2018
2 parents 3011632 + 70958ca commit 0479517
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
1 change: 0 additions & 1 deletion conf/build.test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ build.artifact_mode=symlink
build.test_output=/dev/null
drupal.site_name=drupal-skeleton
drupal.profile=standard
drupal.modules_enable=
drupal.database.database=circle_test
drupal.database.username=ubuntu
drupal.database.password=
Expand Down
3 changes: 1 addition & 2 deletions docs/properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Yields:

Cool! This phing-ism is what powers our environment-specific property layering and loading:

1. Properties are loaded from the phing call itself; for example, adding the flag `-Ddrupal.modules_enable=devel,kint` will set the `drupal.modules_enable` property to `devel,kint`
1. Properties are loaded from the phing call itself; for example, adding the flag `-Dbuild.test_output=artifacts/tests` will set the `build.test_output` property to `artifacts/tests`
1. Set the `build.env` property (if it's not already set with `-D`) from the `PALANTIR_ENVIRONMENT` environment variable; if you're using [the-vagrant](https://github.com/palantirnet/the-vagrant), this will be set to `vagrant`
1. Load properties from your `conf/build.[environment].properties`
1. Load properties from `conf/build.default.properties`
Expand All @@ -46,7 +46,6 @@ Cool! This phing-ism is what powers our environment-specific property layering a
|---|---|---|
| `drupal.site_name` | `Drupal` | Human-readable name for your site. |
| `drupal.profile` | `config_installer` | Install profile. |
| `drupal.modules_enable` | | Comma-separated list of modules to enable after installing Drupal. |
| `drupal.database.database` | `drupal` | |
| `drupal.database.username` | `root` | |
| `drupal.database.password` | `root` | |
Expand Down
26 changes: 14 additions & 12 deletions tasks/drupal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<property name="drupal.database.username" value="drupal" />
<property name="drupal.database.password" value="drupal" />
<property name="drupal.database.host" value="127.0.0.1" />
<property name="drupal.modules_enable" value="" />
<property name="drupal.twig.debug" value="false" />
<property name="drupal.config_sync_directory" value="../conf/drupal/config" /> <!-- pantheon = private/config -->
<property name="build.drupal.settings" value="conf/drupal/settings.php" />
Expand Down Expand Up @@ -76,9 +75,6 @@
<property name="prompt.drupal.profile" value="Drupal install profile" />
<property name="default.drupal.profile" value="standard" />

<property name="prompt.drupal.modules_enable" value="Comma-separated list of modules to enable after install" />
<property name="default.drupal.modules_enable" value="" />

<property name="prompt.drupal.database.database" value="Drupal database name" />
<property name="default.drupal.database.database" value="drupal" />

Expand All @@ -101,7 +97,7 @@
<!-- Generated hash salt -->
<property name="default.drupal.hash_salt" value="${hash_salt}" />

<property name="update" value="drupal.site_name,drupal.profile,drupal.modules_enable,drupal.database.database,drupal.database.username,drupal.database.password,drupal.database.host" />
<property name="update" value="drupal.site_name,drupal.profile,drupal.database.database,drupal.database.username,drupal.database.password,drupal.database.host" />
<property name="dump" value="drupal.settings.file_public_path,drupal.settings.file_private_path,drupal.twig.debug,drupal.uri,drupal.hash_salt,drupal.root" />
</phing>
</target>
Expand Down Expand Up @@ -194,7 +190,6 @@
<fail unless="drupal.site_name" />
<fail unless="drupal.sites_subdir" />
<fail unless="drupal.profile" />
<fail unless="drupal.modules_enable" />

<phingcall target="validate-clean-conf" />

Expand Down Expand Up @@ -234,19 +229,26 @@
<param>${drupal.profile}</param>
</drush>

<foreach list="${drupal.modules_enable}" param="module" target="drupal-enable-module" />
<!-- @todo Remove this conditional in release 2.0 -->
<if>
<not><equals arg1="${drupal.modules_enable}" arg2="" /></not>
<then>
<echo level="warning" msg="The 'drupal.modules_enable' property has been deprecated; please update your build to manage per-environment configuration with the Config Split module instead (https://www.drupal.org/project/config_split)" />
</then>
</if>

<!-- The public files directory, and everything in it, needs to be world writable. -->
<exec command="chmod -R 777 ${drupal.settings.file_public_path.resolved}" checkreturn="true" />
</target>


<!-- Target: drupal-enable-module -->
<!--
Target: drupal-enable-module
@todo Remove this target in release 2.0
-->
<target name="drupal-enable-module">
<fail unless="module" />
<drush command="pm-enable" assume="yes">
<param>${module}</param>
</drush>
<echo level="warning" msg="The 'drupal-enable-module' target has been deprecated; please update your build to manage per-environment configuration with the Config Split module instead (https://www.drupal.org/project/config_split)" />
</target>


Expand Down

0 comments on commit 0479517

Please sign in to comment.