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

Fixes #641: Preventing overwrite of customized scaffold files. #642

Merged
merged 5 commits 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
1 change: 1 addition & 0 deletions phing/files/deploy-exclude.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/drush.wrapper
/README.md
/readme
/sites/development.services.yml
/tests
/tmp
/Vagrantfile
Expand Down
3 changes: 1 addition & 2 deletions phing/tasks/blt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@

<target name="blt:rsync-template" hidden="true">
<echo>Copying files from BLT's template into your project.</echo>
<!-- @todo Do not overwrite structured or executable files. Instead, update them intelligently settings.php, drush.wrapper etc. -->
<exec dir="${repo.root}" command="rsync -a --no-g ${blt.root}/template/ ${repo.root}/ --exclude-from=${blt.update.ignore-existing-file}" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>

<!--Rsync files without overwriting existing-->
<exec dir="${repo.root}" command="rsync -a --no-g ${blt.root}/template/ ${repo.root}/ --include-from=${blt.update.ignore-existing-file} --ignore-existing" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
</target>

<target name="update" depends="blt:rsync-template, blt:update-composer, blt:update-yml, setup:drupal:settings" hidden="true">
<target name="update" depends="blt:rsync-template, blt:update-composer, blt:update-yml" hidden="true">
<phingcall target="install-alias">
<property name="create_alias" value="true"/>
</phingcall>
Expand Down
8 changes: 8 additions & 0 deletions phing/tasks/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
<if>
<not><available file="${docroot}/sites/default/settings.php"/></not>
<then>
<if>
<not><available file="${docroot}/sites/default/default.settings.php"/></not>
<then>
<echo level="verbose">Download scaffold files so that default.settings.php is available.</echo>
<exec dir="${repo.root}" command="composer drupal-scaffold" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true" />
</then>
</if>

<echo>Generating settings.php from default.settings.php.</echo>
<copy file="${docroot}/sites/default/default.settings.php" tofile="${docroot}/sites/default/settings.php" verbose="true"/>
</then>
Expand Down
14 changes: 8 additions & 6 deletions template/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
}
],
"require": {

"cweagans/composer-patches": "dev-master#5456199acdcc16b243814aa45259f4c56272a634 as 1.5.0",
"drupal/acquia_connector": "^8.1.5",
"drupal/acsf": "^8.1.32",
Expand Down Expand Up @@ -43,21 +42,24 @@
"blt": {
"update": true
},
"drupal-scaffold": {
"initial": {
"sites/default/default.services.yml": "sites/default/services.yml",
"sites/default/default.settings.php": "sites/default/settings.php"
}
},
"enable-patching": true,
"installer-paths": {
"docroot/core": ["type:drupal-core"],
"docroot/modules/contrib/{$name}": ["type:drupal-module"],
"docroot/profiles/contrib/{$name}": ["type:drupal-profile"],
"docroot/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/contrib/{$name}": ["type:drupal-drush"]
},
"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"
}
}
},
"scripts": {
"blt-alias": "blt install-alias -Dcreate_alias=true",
"drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
"nuke": [
"rm -rf vendor composer.lock",
"@composer clearcache",
Expand Down