Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Adding local:toggle-modules and deploy:toggle-modules targets. #643

Merged
merged 1 commit into from
Nov 9, 2016
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions phing/tasks/ci.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@
<property name="drush.alias" value="${drush.aliases.ci}"/>
</phingcall>
</target>

<target name="ci:toggle-modules" description="Enables modules.ci.enable projects and uninstalls modules.ci.uninstall projects.">
<phingcall target="setup:toggle-modules">
<param name="enable" value="${modules.ci.enable}"/>
<param name="uninstall" value="${modules.ci.uninstall}"/>
</phingcall>
</target>
</project>
8 changes: 7 additions & 1 deletion phing/tasks/deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
</delete>
</target>

<target name="deploy:update" description="Update current database to reflect the state of the Drupal file system; uses local drush alias.">
<target name="deploy:update" description="Update current database to reflect the state of the Drupal file system; uses local drush alias." depends="deploy:toggle-modules">
<phingcall target="setup:update">
<property name="drush.alias" value="self"/>
<!-- Most sites store their version-controlled configuration in /config/default. -->
Expand All @@ -166,4 +166,10 @@
</phingcall>
</target>

<target name="deploy:toggle-modules" description="Enables modules.deploy.enable projects and uninstalls modules.deploy.uninstall projects.">
<phingcall target="setup:toggle-modules">
<param name="enable" value="${modules.deploy.enable}"/>
<param name="uninstall" value="${modules.deploy.uninstall}"/>
</phingcall>
</target>
</project>
11 changes: 9 additions & 2 deletions phing/tasks/local-sync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<target name="local:refresh" description="Refreshes local environment from upstream testing database." depends="setup:build, local:sync, local:update"/>

<target name="local:setup" description="Install dependencies, builds docroot, installs Drupal; uses local drush alias.">
<target name="local:setup" description="Install dependencies, builds docroot, installs Drupal; uses local drush alias." depends="local:toggle-modules">
<phingcall target="setup">
<property name="drush.alias" value="${drush.aliases.local}" />
</phingcall>
Expand All @@ -30,7 +30,14 @@
<drush command="cache-rebuild"/>
</target>

<target name="local:update" description="Update current database to reflect the state of the Drupal file system; uses local drush alias.">
<target name="local:toggle-modules" description="Enables modules.local.enable projects and uninstalls modules.local.uninstall projects.">
<phingcall target="setup:toggle-modules">
<param name="enable" value="${modules.local.enable}"/>
<param name="uninstall" value="${modules.local.uninstall}"/>
</phingcall>
</target>

<target name="local:update" description="Update current database to reflect the state of the Drupal file system; uses local drush alias." depends="local:toggle-modules">
<phingcall target="setup:update">
<property name="drush.alias" value="${drush.aliases.local}"/>
</phingcall>
Expand Down
10 changes: 10 additions & 0 deletions phing/tasks/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,14 @@
</drush>
</target>

<target name="setup:toggle-modules" description="Enables and uninstalls specified modules.">
<drush command="pm-enable" assume="yes">
<param>${enable}</param>
<option>skip</option>
</drush>
<drush command="pm-uninstall" assume="yes">
<param>${uninstall}</param>
</drush>
</target>

</project>
2 changes: 2 additions & 0 deletions template/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"drupal/memcache" : "^8.2.0-alpha2",
"drupal/search_api": "8.1.0-alpha14",
"drupal/search_api_solr": "8.1.0-alpha3",
"drupal/seckit": "^8.1.0-alpha2",
"drupal/security_review": "8.*",
"drupal-composer/drupal-security-advisories": "8.0.x-dev",
"drush/drush": "^9.0"
Expand All @@ -26,6 +27,7 @@
"behat/behat": "^3.1",
"behat/mink": "~1.7",
"behat/mink-selenium2-driver": "^1.3.1",
"drupal/devel": "^8.1.0-alpha1",
"drupal/drupal-extension": "^3.2",
"drupal-composer/drupal-scaffold": "^2.1.0",
"jarnaiz/behat-junit-formatter": "^1.3.2",
Expand Down
29 changes: 29 additions & 0 deletions template/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,32 @@ target-hooks:

# Define any custom Phing files that you'd like to import. E.g., ${repo.root}/blt/phing/build.xml
import: ~

# An array of modules to be enabled or uninstalled automatically in dev vs prod contexts.
# All local:* targets assume the "dev" context, whereas "deploy:*" targets assume a prod context.
modules:
ci:
enable: []
uninstall:
- acquia_connector
- shield
deploy:
enable:
- acquia_connector
- shield
uninstall:
- devel
- field_ui
- views_ui
local:
enable:
- dblog
- devel
- field_ui
- seckit
- views_ui
uninstall:
- acsf
- acquia_connector
- dblog
- shield