Make default PROJECT_FILES respect .gitattributes export-ignore
#161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
symlink-projectcommand helpfully provides a way to override the list of files it should symlink via thePROJECT_FILESenvironment variable. This is great if you're willing to hardcode the list, but more than a little difficult to achieve if you want a dynamic list. In order to get the most production-like version of my module placed, I wanted to not symlink any files that would be omitted by the Drupal.org Composer Facade, i.e., those that aren't excluded via.gitattributesexport-ignore. (At first I wanted to exclude those in.gitignore, too, but then I realized that could incorrectly exclude compiled code, like CSS and JS.) And I didn't want to hardcode that list and set future developers up for failure when they add new files and forget about it.So I came up with a solution. It works for me, and I'm satisfied with it. I don't know if it will interest anyone else, but I thought I'd put it out there in case it could help someone. I don't necessarily expect that it will actually be merged.
How This PR Solves The Issue
It makes the default behavior in
symlink-projectexclude not only the hardcoded list of common files but also any that are in.gitattributeswithexport-ignore. (I also added "docroot" to the default list while I was there, since some hosting providers (e.g., Acquia) use that.Manual Testing Instructions
Automated Testing Overview
As I'm just "throwing this over the wall", I'm not taking the time to write automated tests.
Release/Deployment Notes
TBD