Skip to content

Commit

Permalink
Merge pull request #239 from palantirnet/DEV-74-remove-standard-profi…
Browse files Browse the repository at this point in the history
…le-after-installing-the-build

DEV-74: Remove standard profile after installing the-build
  • Loading branch information
becw authored Aug 28, 2024
2 parents 52f2d18 + e3e04df commit ba04c00
Showing 1 changed file with 1 addition and 47 deletions.
48 changes: 1 addition & 47 deletions targets/drupal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,9 @@ Or, you can specify the export file directly:
<param>the_build_utility</param>
</drush>

<phingcall target="drupal-change-profile">
<property name="new_profile" value="minimal" />
</phingcall>

<drush command="pm-uninstall" assume="yes">
<param>the_build_utility</param>
<param>standard</param>
</drush>

<drush command="config-export" assume="yes" />
Expand All @@ -318,49 +315,6 @@ Or, you can specify the export file directly:
</target>


<target name="drupal-change-profile" description="Change the install profile on an existing Drupal site.">
<fail unless="new_profile" />

<!-- Get the name of the current profile. -->
<drush command="config-get" returnProperty="current_profile">
<param>core.extension</param>
<param>profile</param>
<option name="format">csv</option>
</drush>

<!-- If the current profile is enabled in the core extensions list, disable it. -->
<drush command="config-get" returnProperty="current_profile_weight">
<param>core.extension</param>
<param>module.${current_profile}</param>
<option name="format">csv</option>
</drush>

<if>
<not><equals arg1="${current_profile_weight}" arg2="" /></not>
<then>
<drush command="config-delete" assume="yes">
<param>core.extension</param>
<param>module.${current_profile}</param>
</drush>
</then>
</if>

<!-- Enable the new profile. -->
<drush command="config-set" assume="yes">
<param>core.extension</param>
<param>module.${new_profile}</param>
<param>1000</param>
</drush>

<!-- Update the profile setting itself. -->
<drush command="config-set" assume="yes">
<param>core.extension</param>
<param>profile</param>
<param>${new_profile}</param>
</drush>
</target>


<target name="drupal-add-multisite" description="Set up a new Drupal multisite.">
<if>
<equals arg1="${build.host}" arg2="pantheon" />
Expand Down

0 comments on commit ba04c00

Please sign in to comment.