Skip to content

Commit

Permalink
Issue #38: Test for features overrides. (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell authored and grasmash committed Dec 22, 2016
1 parent 549171f commit 51ee2c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions phing/tasks/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,18 @@
<drush command="fra" assume="yes" alias="${drush.alias}">
<option name="bundle">${bundle}</option>
</drush>
<if>
<equals arg1="${cm.features.no-overrides}" arg2="true"/>
<then>
<exec command="${drush.bin} @${drush.alias} fl --bundle=${bundle} | grep -Ei '(changed|conflicts|added)( *)$'" outputProperty="features.overrides"/>
<if>
<istrue value="${features.overrides}"/>
<then>
<fail>A feature in the ${bundle} bundle is overridden. You must re-export this feature to incorporate the changes.</fail>
</then>
</if>
</then>
</if>
</target>

<target name="setup:toggle-modules" description="Enables and uninstalls specified modules.">
Expand Down
1 change: 1 addition & 0 deletions template/blt/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ target-hooks:
# cm:
# features:
# bundle: blted8
# no-overrides: 'true'

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

0 comments on commit 51ee2c5

Please sign in to comment.