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

Added features bundle argument. #479

Merged
merged 3 commits into from
Oct 5, 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
27 changes: 17 additions & 10 deletions phing/tasks/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,23 @@
<drush command="config-import" assume="yes" alias="${drush.alias}">
<option name="partial"></option>
</drush>
<!-- Enable features module. -->
<drush command="en" assume="yes" alias="${drush.alias}">
<param>features</param>
</drush>
<!-- Clear drush caches to register features drush commands. -->
<drush command="cc" assume="yes" alias="${drush.alias}">
<param>drush</param>
</drush>
<!-- Revert all features. -->
<drush command="fra" assume="yes" alias="${drush.alias}"/>
<if>
<isset property="cm.features.bundle"/>
<then>
<!-- Enable features module. -->
<drush command="en" assume="yes" alias="${drush.alias}">
<param>features</param>
</drush>
<!-- Clear drush caches to register features drush commands. -->
<drush command="cc" assume="yes" alias="${drush.alias}">
<param>drush</param>
</drush>
<!-- Revert all features. -->
<drush command="fra" assume="yes" alias="${drush.alias}">
<option name="bundle">${cm.features.bundle}</option>
</drush>
</then>
</if>
<!-- Rebuild caches. -->
<drush command="cr" alias="${drush.alias}"/>
</target>
Expand Down
4 changes: 4 additions & 0 deletions template/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"drupal/cog": "~8",
"drupal/console": "1.0.0-beta5",
"drupal/core": "~8",
"drupal/features": "~8.3.0-beta9",
"drupal/lightning": "~8",
"drupal/memcache" : "8.*",
"drupal/search_api": "8.1.0-alpha14",
Expand Down Expand Up @@ -56,6 +57,9 @@
"patches": {
"drupal/core": {
"Ignore front end vendor folders to improve directory search performance": "https://www.drupal.org/files/issues/ignore_front_end_vendor-2329453-116.patch"
},
"drupal/features": {
"Bundle support": "https://www.drupal.org/files/issues/features-2808303-2.patch"
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions template/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ target-hooks:
dir: ${docroot}/profiles/contrib/lightning
command: npm run install-libraries

# Configuration management options, such as core CM or features.
# cm:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little hesitant to introduce a new top level array into this file, unless we really think we're going to build out other options.

What if we just made the assumption that we'd use the machine name?

Copy link
Contributor Author

@danepowell danepowell Oct 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that, but it won't work for a lot of existing projects that already have different machine and bundle names (including mine). It also wouldn't let you specifically disable features integration.

Note that if you provide a non-existent bundle name, the features revert will still run but will throw a warning.

If you don't want to introduce a new top-level config, we could just put this under "project" for now until we decide to expand CM support.

# features:
# bundle: blted8

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

Expand Down